You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following assertion holds true for legacy browsers:
// actual will only be undefined in modern browsers.letactual=window.getComputedStyle(elt,function(){});// expected will always be a CSSStyleDeclarationletexpected=window.getComputedStyle(elt);// This works in legacy browsers:assert.deepEqual(actual,expected);
The text was updated successfully, but these errors were encountered:
ExE-Boss
changed the title
[cssom] Allow passing a callback to window.getComputedStyle
[cssom] Allow passing a callback to window.getComputedStyle(…)Jan 31, 2019
If we want it to be asynchronous, it would probably be better to add another function which returns a Promise<CSSStyleDeclaration> or so. But before that, could you elaborate why you want an asynchronous gCS? What usecase are you trying to solve?
https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle
Right now,
window.getComputedStyle(…)
is always executed synchronously.By allowing the last parameter to be a callback, this function could be made asynchronous in a backwards compatible manner.
The following assertion holds true for legacy browsers:
The text was updated successfully, but these errors were encountered: