W3C home > Mailing lists > Public > public-css-archive@w3.org > June 2016

Re: [csswg-drafts] [cssom] Should make it clear that static functions on CSS are Window-scoped

From: Daniel Holbert via GitHub <sysbot+gh@w3.org>
Date: Fri, 10 Jun 2016 17:49:23 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-225249724-1465580962-sysbot+gh@w3.org>
> 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:

    A static operation is one that is not called on a particular 
instance
    of the interface on which it is declared, and is instead 
associated
    with the interface itself.
https://www.w3.org/TR/WebIDL/#idl-static-operations

When such a function is specced as...
 * changing state in a way that influences behavior (as with houdini 
`CSS.registerProperty`)
 * depending on state (as with `CSS.supports` in the face of possible 
calls to `registerProperty` which should influence supported styles)
...I don't think the WebIDL spec or Houdini Properties & Values says 
anything right now about where 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.

-- 
GitHub Notification of comment by dholbert
Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/180#issuecomment-225249724 
using your GitHub account
Received on Friday, 10 June 2016 17:49:25 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:40:59 UTC