Hacker News new | past | comments | ask | show | jobs | submit login

Good 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.




Yeah, that works, but it requires func() to be on the global scope. It doesn't scale as a solution.


Does that matter now that we've got (possibly declarative) shadow roots as the units of DOM encapsulation?


Yes, even more so. You end up with encapsulated DOM without encapsulated script.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: