[csswg-drafts] [cssom] "Specifications that define static functions on ..."

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

== [cssom] "Specifications that define static functions on ..." ==
https://drafts.csswg.org/cssom/#example-fc08f03e

> Specifications that define static functions on the CSS interface and want to store some state should store the state on the current global object’s associated Document\.

In https://github.com/w3c/css-houdini-drafts/issues/410#issuecomment-304980638 @domenic says

> I agree things are a bit confusing here. I probably was the one who suggested "should store the state on the current global object’s associated Document." But I am not sure why that is better than just "the current global object". All the "associated Document" bit does is make things confusing when document.open() gets involved. So maybe if we simplified it to just "the current global object" as the rule for all static things (and all namespace things), it would be better.

The text was added in e9edde36893a9f27c12d06534e585cad1bcabd5f for #180.

The relevant method under discussion is `registerProperty()`, https://github.com/w3c/css-houdini-drafts/issues/216 . It seems better to me to have that state go away with `document.open()`, just like any stylesheets go away. But if `paintWorklet` should be on the global instead, I suppose we need to nuance the advice or drop it...

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

Received on Wednesday, 31 May 2017 07:15:58 UTC