Closed fabiancook closed 1 year ago
It feels like this saves a bit of typing, at the cost of obscuring the mechanism by which this is implemented and works. As such, I don't think we want to go in this direction with the API.
Super agree. And it can be easily implemented in userland without much overhead at all...
This is a bit of detour from
addEventListener
, but it seems very possible to add a "top level"intercept
as a shortcutWithout committing to adding handlers, it could be useful for changing the way navigation works without adding an event listener
Once you do have this function though, having it also accept a handler seems also reasonable, however I think this would be different from any other web api
How nice it would be to have intercept across a few different web apis...