[csswg-drafts] [cssom-view] Step one of client{Width, Height} should be moved. (#3582)

emilio has just created a new issue for https://github.com/w3c/csswg-drafts:

== [cssom-view] Step one of client{Width,Height} should be moved. ==
The following pages:

```html
<!doctype html><html style="display: none"><script>alert(document.documentElement.clientWidth)</script>
```

```html
<html style="display: none"><body><script>alert(document.body.clientWidth)</script>
```

Don't alert 0 in any case in neither Gecko, Blink or WebKit, even though per spec they should given the first point. https://drafts.csswg.org/cssom-view/#dom-element-clientwidth says:

> If the element has no associated CSS layout box or if the CSS layout box is inline, return zero.

We should probably move it to be the step 2 to match implementations.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3582 using your GitHub account

Received on Thursday, 31 January 2019 21:45:15 UTC