Closed triblondon closed 7 years ago
@domenic suggests this part would benefit from a further example:
Instead, use the speculative polyfill as a library
Brian:
Is domenic asking for something as simple as this?
DO
element._asTokenList('attrName').add("foo")
DON'T
Element.prototype.tokenList = Element.prototype.tokenList || Element.prototype._asTokenList; element.asTokenList('attrName').add("foo")
(I suggested asTokenList as a way to act on any attribute as a DOMTokenList https://briankardell.wordpress.com/2016/03/29/tokenlists-missing-web-dna/)
Proposed solution is in PR: https://github.com/w3ctag/polyfills/issues/19. Will take feedback there.
@domenic suggests this part would benefit from a further example:
Brian:
DO
DON'T