fgnass / domino

Server-side DOM implementation based on Mozilla's dom.js
BSD 2-Clause "Simplified" License
768 stars 120 forks source link

Implement DOMTokenList replace and supports #111

Closed arlolra closed 6 years ago

arlolra commented 6 years ago

https://dom.spec.whatwg.org/#domtokenlist

ppKrauss commented 6 years ago

... To start the job, a suggestion. The most important is tokenlist.value (get and set).

cscott commented 6 years ago

Didn't implement DOMTokenList#supports() because I couldn't find any specs which actually used it. The primary use of DOMTokenList is Element#classList, and that gives a TypeError when #supports() is called:

el = document.createElement('div');
el.supports(' ')
TypeError: div attribute of <class> does not define any supported tokens

Reopen a new bug if there's a specific use case for #supports() you'd like implemented.