Re: [whatwg/dom] Spec for DOMTokenList stringifier disagrees with every single implementation (#105)

One note, if I understood correctly, then we have:
- fix https://github.com/whatwg/dom/commit/2920fc15b9e894c45ff84c5d3bb77f7513ff50e5 for this bug change stringifire behaviour and getting `DOMTokenList.value`
- but this result https://github.com/whatwg/dom/issues/201#issuecomment-208048248 shows, that WebKit implemented earlier behavior also for setting `DOMTokenList.value`, what was changed in this fix https://github.com/whatwg/dom/commit/e48ced42e68ce540c8d7c05d43868082f9d86f11
So it looks like WebKit for this three cases has now something what was defined earlier, like this snapshot:
https://www.w3.org/TR/dom/#dom-domtokenlist-stringifier
https://www.w3.org/TR/dom/#dom-domsettabletokenlist-value
Of course change all of them requires changes in every stable browsers. On the other hand these actual definitions fit to the situation even when browsers for some IDL attribute use String (instead DOMTokenList/DOMSettableTokenList) which, in principle, for some of them still exists today.
```js
<script>

 var el_a = document.createElement("a");
 var el_area = document.createElement("area");
 var el_link = document.createElement("link");
 var el_iframe = document.createElement("iframe");
 var el_output = document.createElement("output");
 var el_th = document.createElement("th");
 var el_td = document.createElement("td");
 var el_html = document.documentElement;

 function supportSet(desc, el, attr){
  var status = "FAILD";
  console.log(desc);
  if (el[attr] != undefined){
   console.log(el.localName + "." + attr + ".constructor: " + el[attr].constructor);
   if (typeof el[attr] == "object"){
    status = "PASS";
   }
  }
  else{
   console.log("Completly not support this attr in element.");
  }
  console.log(status + "\n\n");
 }

 var desc_start = "Support DOMTokenList for ";

 supportSet(desc_start + "HTML and CLASS:", el_html, "classList");
 supportSet(desc_start + "HTML and DROPZONE:", el_html, "dropzone");
 supportSet(desc_start + "LINK and SIZES:", el_link, "sizes");
 supportSet(desc_start + "A and PING:", el_a, "ping");
 supportSet(desc_start + "AREA and PING:", el_area, "ping");
 supportSet(desc_start + "TH and HEADERS:", el_th, "headers");
 supportSet(desc_start + "TD and HEADERS:", el_td, "headers");
 supportSet(desc_start + "OUTPUT and FOR:", el_output, "htmlFor");
 supportSet(desc_start + "IFRAME and SANDBOX:", el_iframe, "sandbox");
 supportSet(desc_start + "LINK and REL:", el_link, "relList");
 supportSet(desc_start + "A and REL:", el_a, "relList");
 supportSet(desc_start + "AREA and REL:", el_area, "relList");

</script>
```
Which actually leads me to ask the question: what exactly is planning to change (if at all)?


---
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/105#issuecomment-208313414

Received on Monday, 11 April 2016 12:20:11 UTC