Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cssom] getComputedStyle can return null? #572

Closed
zcorpan opened this issue Oct 5, 2016 · 2 comments
Closed

[cssom] getComputedStyle can return null? #572

zcorpan opened this issue Oct 5, 2016 · 2 comments
Labels
cssom-1 Current Work

Comments

@zcorpan
Copy link
Member

zcorpan commented Oct 5, 2016

Related to
#571
and maybe
#219

In Gecko, the following alerts null

<!DOCTYPE html>
<iframe style=display:none srcdoc="<style>body{background:blue}</style>x"></iframe>
<script>
onload = () => {
alert(window[0].getComputedStyle(window[0].document.body))
}
</script>

In WebKit/Chromium/Edge 13 it alerts [object CSSStyleDeclaration].

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4543

cc @bzbarsky

@zcorpan zcorpan added the cssom-1 Current Work label Oct 5, 2016
@bzbarsky
Copy link

bzbarsky commented Oct 5, 2016

I consider this a bug in Gecko (which causes web compat problems) that I'm trying to fix. The work on fixing it is where the investigation that led to whatwg/html#1813 came from.

@zcorpan
Copy link
Member Author

zcorpan commented Oct 5, 2016

Thanks!

@zcorpan zcorpan closed this as completed Oct 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cssom-1 Current Work
Projects
None yet
Development

No branches or pull requests

2 participants