Test case: http://software.hixie.ch/utilities/js/live-dom-viewer/saved/2622 <!doctype html> <script data-x-2=x>document.write(document.querySelector("script").dataset.length == 1 ? 'PASS' : 'FAIL')</script> Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#dom-dataset Note that the spec says ASCII *letter*, so step 3 is no-op for this case. Similar issue in Blink: https://code.google.com/p/chromium/issues/detail?id=171175
All browsers (Chrome Canary 106, Firefox Nightly 105 and Safari 15.6 on macOS 12.5) show "FAIL" for this test case. Is this something removed from Web-Spec or not implemented by all browsers. Just wanted to share updated status. Thanks!
All browsers agree -> config changed.
Sadly no, this works in Firefox and in Chrome, but fails in Safari. The reason why the test fails in all browsers is that DOMStringMap doesn't have a length property, but if you look at document.querySelector("script").dataset in developer tools, other browsers have the correct value, and we have "x-2 -> undefined".
wow, this is so bad. DOMStringDataset has a different code just for when there is exactly one attribute and it's precisely why it fails in that particular case.
Pull request: https://github.com/WebKit/WebKit/pull/3498
Committed 253625@main (8a40482a9c10): <https://commits.webkit.org/253625@main> Reviewed commits have been landed. Closing PR #3498 and removing active labels.
<rdar://problem/98937188>