-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[spec bug?] Element with name attribute breaks Document #4112
Comments
I found the note about DOM clobbering. All modern browser prevent DOM clobbering by
|
Unfortunately this design is entirely a product of web compatibility, and cannot be changed. |
Though we could have a feature policy or some such to control it. |
moved from whatwg/dom#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 inDocument
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.code: https://codepen.io/petamoriken/pen/zmaRJX
(appendix)
WindowProxy
version: https://codepen.io/petamoriken/pen/MPXNJeThe text was updated successfully, but these errors were encountered: