Properties & Values API CSS operations static or not static?

Hi! I’m an intern at Mozilla looking into implementing the Properties & Values API in Firefox/Gecko.

My mentor & I noticed that a year ago the spec changed [0] about what interface the registerProperty/unregisterProperty functions are defined to hang off of. They used to be defined on the Document interface, but now are defined on the CSS interface [1], which previously only had static functions [2][3] (escape and supports).

Is the ownership / lifetime / etc. of the CSS object specced/described anywhere? Right now in Firefox, there is no CSS object — it’s just a class with a few static functions. Is it supposed to be owned by the document, the global object, or something else?

Alternatively, should the register/unregisterProperty functions be static, like the other functions defined on CSS?

Finally, is the ownership model / lifetime / etc. of the CSS object explained or implied in any spec at this point?

Thanks.

Best regards,
Jonathan Chan

[0]: https://github.com/w3c/css-houdini-drafts/commit/8beba578faaa4d466afd62290f3a0d8c2bd9352b
[1]: https://drafts.css-houdini.org/css-properties-values-api/#registering-custom-properties
[2]: https://drafts.csswg.org/cssom-1/#css
[3]: https://drafts.csswg.org/css-conditional-3/#the-css-interface

Received on Wednesday, 8 June 2016 23:47:20 UTC