1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:07:34 +00:00

LibWeb: Implement DOMTokenList for managing space-separated tokens lists

DOMTokenList is used as the return type of, e.g., the Element.classList
property.
This commit is contained in:
Timothy Flynn 2021-10-18 11:53:40 -04:00 committed by Andreas Kling
parent 4d8320a49a
commit d24ae8063b
6 changed files with 339 additions and 0 deletions

View file

@ -0,0 +1,12 @@
interface DOMTokenList {
readonly attribute unsigned long length;
getter DOMString? item(unsigned long index);
boolean contains(DOMString token);
[CEReactions] undefined add(DOMString... tokens);
[CEReactions] undefined remove(DOMString... tokens);
[CEReactions] boolean toggle(DOMString token, optional boolean force);
[CEReactions] boolean replace(DOMString token, DOMString newToken);
boolean supports(DOMString token);
[CEReactions] stringifier attribute DOMString value;
iterable<DOMString>;
};