[whatwg/dom] DOMTokenList.remove() can add an attribute (#462)

Specification: https://dom.spec.whatwg.org/#dom-domtokenlist-remove
WPT: http://w3c-test.org/dom/nodes/Element-classlist.html

Should ```remove()``` really add an empty attribute?

According to the current specification, the following code should show ```""``` (empty string).

```
var c = document.createElement('div');
c.classList.remove('a');
alert('"' + c.getAttribute('class') + '"');
```

Safari TP works so.  

The WPT test contains some sub-tests which don't conform to the specification. e.g.  "classList.remove("a") with attribute value null (HTML node)"
These sub-tests assume ```remove()``` never adds ```class``` attribute, and Firefox nightly, Chrome, and Edge don't add an empty attribute.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/462

Received on Monday, 22 May 2017 23:19:05 UTC