Reverted getDefaultComputedStyle() has been removed

Published: | Categories: DOM


The non-standard window.getDefaultComputedStyle method, that returns the browser’s default computed values on an element, has been removed with Firefox 55. Unlike the similar getComputedStyle method, it has never been standardized as part of the CSSOM spec nor implemented in other browsers.

It’s known to be used in jQuery, but the removal should not be a problem thanks to proper feature detection and fallback. No other use cases have been identified.

Update: Due to a compatibility issue affecting the older versions of jQuery, where getComputedStyle returns null inside invisible iframes, this change has been backed out from Firefox 55. However, the getDefaultComputedStyle method will be removed anyway in the future.