custom-attributes
custom-attributes copied to clipboard
performance: observe only defined attributes
Currently the MutationObserver reacts to changes in any attribute (f.e. the style attribute, any time LUME elements update their CSS3D transforms).
Instead, the MutationObserver should only observe changes in specified attributes (the defined "custom attributes") to avoid perf cost of the callback being called for every attribute change.
Use the attributeFilter option to MutationObserver.observe.