In the proposal, you might write: @handler( event="mousemove", element=Element("empty_button").element )
Instead, I propose allowing element: Element | str. If it is a string, then use document.querySelector. This would have a few benefits:
- It's nicer. 😀
- It doesn't require evaluation at import time.
- It could match multiple nodes and attach handlers to them.