4 ms·
This means you couldn't non-string values on DOM interfaces, and that includes methods, so most of the DOM's functionality goes out the window.
by jaffathecake 2y ago
This means you couldn't non-string values on DOM interfaces, and that includes methods, so most of the DOM's functionality goes out the window.
- noam_k 2y agoGood point, but HTML already has a workaround by using strings: <div onClick="func()">...</div> Now, I'm not a JS developer, so my opinion shouldn't count for much, but that looks like a much less usable standard to me.
- jaffathecake 2y agoYeah, that works, but it requires func() to be on the global scope. It doesn't scale as a solution.
- debugnik 2y agoDoes that matter now that we've got (possibly declarative) shadow roots as the units of DOM encapsulation?
- jaffathecake 2y agoYes, even more so. You end up with encapsulated DOM without encapsulated script.