mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +01:00
script: Support custom element states (#38564)
Also adds support for `:state`. Testing: Covered by existing tests --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
dcd25072d3
commit
04dd74dddb
20 changed files with 209 additions and 152 deletions
|
@ -244,7 +244,7 @@ DOMInterfaces = {
|
|||
},
|
||||
|
||||
'ElementInternals': {
|
||||
'canGc': ['CheckValidity', 'GetLabels', 'SetValidity', 'ReportValidity'],
|
||||
'canGc': ['CheckValidity', 'GetLabels', 'SetValidity', 'ReportValidity', 'States'],
|
||||
},
|
||||
|
||||
'EventSource': {
|
||||
|
|
|
@ -26,6 +26,9 @@ interface ElementInternals {
|
|||
[Throws] boolean reportValidity();
|
||||
|
||||
[Throws] readonly attribute NodeList labels;
|
||||
|
||||
// Custom state pseudo-class
|
||||
[SameObject] readonly attribute CustomStateSet states;
|
||||
};
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#elementinternals
|
||||
|
@ -42,3 +45,8 @@ dictionary ValidityStateFlags {
|
|||
boolean customError = false;
|
||||
};
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#customstateset
|
||||
[Exposed=Window]
|
||||
interface CustomStateSet {
|
||||
setlike<DOMString>;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue