[whatwg/dom] [spec bug?] Element with name attribute breaks Document (#708)

https://html.spec.whatwg.org/multipage/dom.html#dom-document-nameditem

Modern browsers except Edge expose `Element` with name attribute more preferentially than a property already defined in `Document` WebIDL. Since this behavior seems to be dangerous, IMHO, it is better to design specifications that preferentially return defined properties if there is no compatibility problem. 

```html
<title>This is Document Title</title>
<form name="title"></form>
<script>
  console.log(document.title);
  // <form name="title"></form> in Chrome, Firefox, Safari
  // "This is Document Title" in Edge
</script>
```

code: https://codepen.io/petamoriken/pen/zmaRJX
(appendix) `WindowProxy` version: https://codepen.io/petamoriken/pen/MPXNJe

-- 
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/708

Received on Sunday, 21 October 2018 16:09:03 UTC