Skip to content

[cssom] "Specifications that define static functions on ..." #1483

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

Open
zcorpan opened this issue May 31, 2017 · 0 comments
Open

[cssom] "Specifications that define static functions on ..." #1483

zcorpan opened this issue May 31, 2017 · 0 comments

Comments

@zcorpan
Copy link
Member

zcorpan commented May 31, 2017

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 w3c/css-houdini-drafts#410 (comment) @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 e9edde3 for #180.

The relevant method under discussion is registerProperty(), w3c/css-houdini-drafts#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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant