script: Implement CSS.registerProperty (#38682)

The implementation is mostly equivalent to
https://searchfox.org/mozilla-central/source/servo/ports/geckolib/glue.rs#9480.

Testing: New web platform tests start to pass

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-08-14 15:34:02 +02:00 committed by GitHub
parent 3a0e8fefde
commit 43da933247
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 185 additions and 46 deletions

View file

@ -24,13 +24,13 @@ partial namespace CSS {
};
// https://drafts.css-houdini.org/css-properties-values-api/#the-registerproperty-function
// dictionary PropertyDefinition {
// required DOMString name;
// DOMString syntax = "*";
// required boolean inherits;
// DOMString initialValue;
// };
dictionary PropertyDefinition {
required DOMString name;
DOMString syntax = "*";
required boolean inherits;
DOMString initialValue;
};
// partial namespace CSS {
// undefined registerProperty(PropertyDefinition definition);
// };
partial namespace CSS {
[Throws] undefined registerProperty(PropertyDefinition definition);
};