Re: [csswg-drafts] [cssom] [css-display] [css-values] Clarify behavior of window.getComputedStyle on detached subtrees, and the definition of "the root element".

>From a recent test I ran for the no browsing context case:

```js
const xdoc = xhr.responseXML;
const div = xdoc.getElementById('test');
div.style.opacity = '0';
alert(getComputedStyle(div).opacity);
```

We get '0' in Firefox and Edge, but null in Chrome.

However, if instead of using the style attribute, we set style in a `<style>` element using a `div { }` selector in *either* the document we're calling from (i.e. `window.document` above) *or* the XHR doc and do the same we get '1' in Firefox and Edge, but null in Chrome.


-- 
GitHub Notification of comment by birtles
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1548#issuecomment-310238185 using your GitHub account

Received on Thursday, 22 June 2017 00:04:07 UTC