DOMAttrModified and DOMSubtreeModified events are no longer fired when style attribute is changed via CSSOM

Published: | Categories: CSS, DOM

Description

Firefox has stopped triggering the DOMAttrModified and DOMSubtreeModified mutation events for changes on the element’s style attribute via CSSOM such as the style property.

This change has been made to solve site performance issues where a nested DOMSubtreeModified event could go into an infinite loop in some cases. Such issues don’t occur on Chrome and Safari because the DOMAttrModified event is not implemented in these browsers.

The alternative mutation observers are not affected by this change.

Note that mutation events are marked as deprecated in the DOM3 UI Events spec, and therefore the support will be removed from the browsers in the future. Use mutation observers instead in any case.

References