Somewhat related to #1548 and #1964.
Right now the spec doesn't really match any implementations. Implementations usually return the style of the element styled as the document it's in (Firefox doesn't in some cases, I can try to explain if people are curious).
In any case, for a visible iframe and an element in the document, the behavior of all engines is definitely not the one required by the spec in https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle:
Note: This means that even if obj is in a different document (e.g. one fetched via XMLHttpRequest) it will still use the style rules associated with the document that is associated with the global object on which getComputedStyle() was invoked to compute the CSS declaration block.
And they just return the style of the element for the document they're in.
cc @lilles @FremyCompany @bzbarsky @dbaron
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4