Skip to content

[cssom] getComputedStyle can return null? #572

@zcorpan

Description

@zcorpan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions