Haz@haz.dev21 AugHTML forms are so broken. With every other element, you can do this: <div id="foo"> div.id // "foo" Forms work the same way too: <form id="bar"> form.id // "bar" But then: <form id="bar"> <input name="id"> form.id // the input element 🤡613
Haz@haz.dev21 AugAnd it doesn't stop with attributes. An input named "click" breaks form.click(), etc.35
Haz@haz.dev21 AugNow guess what happens to document.activeElement if you have this: <form name="activeElement"> Yes, it’s as bad as it gets.23
Haz@haz.devIf you add the name attribute to the form element itself, it pollutes the document scope.21/8/26, 2:54 pm·0 reposts·0 likes