-
Notifications
You must be signed in to change notification settings - Fork 715
[cssom] Should make it clear that static functions on CSS are Window-scoped #180
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
Comments
(Though if it doesn't matter, maybe they should be |
Isn't this defined by WebIDL? Same as any other interface? |
I don't think so. Note that we're talking about static functions here. WebIDL says this about static functions:
https://www.w3.org/TR/WebIDL/#idl-static-operations When such a function is specced as...
...I don't think the WebIDL spec or Houdini Properties & Values says anything right now about where (or how long) that "static" state lives. WebIDL talks about state associated with instances of interfaces, but I don't see anything about state associated with the interface itself for static functions to read/modify. |
Domenic just posted an excellent breakdown of what all the globals are for a page. This indicates that we (a) probably can't define this globally, but (b) have a pretty clear answer on what to refer to for any given API. |
cc @domenic |
You have two choices here, basically depending on whether you think of The distinguishing code is
To access To access In both cases you could add "...'s associated |
CSS is just a namespace object. There should be absolutely zero difference between We probably want to attach to the document itself, so we actually want "this CSS interface's relevant global object's associated Document". |
I'm sorry, I got it backwards in my post. You want the "current global object". My bullets were correct but my "To access" was wrong. Let me do some ins/dels. |
In w3c/css-houdini-drafts#216 there's some confusion about what scope the functions on the CSS interface should have - are they document-specific (somehow), window-specific, or global across the browser?
The intention is always that these are window-specific. The spec should have some clarifying text for this.
The text was updated successfully, but these errors were encountered: