Does this mean websites can now hijack android’s OS-level back button? In addition to hijacking the browser level one?<p>I hate when I hit back, but instantly redirect to the same page. This is so frustrating when it happens. And it happens even on major sites. (Microsoft’s official community “answers” forums have given me this issue lately. Fills up search results and then traps you there)
> CloseWatcher API<p>> Chrome 120 brings the solution with CloseWatcher, a new API for directly listening and responding to close requests.<p>> watcher.addEventListener("close", () => document.querySelector("#sidebar").classList.remove("open"));<p>Couldn't they add an HTML attribute onCloseRequest?<p>Slightly related, I wish there was an attribute "onClickOutside" so we could close modals and dropdown menus without manually adding an event listener on the window and checking if the click wasn't inside the element.
I don’t think I <i>ever</i> like accordions where you can only have one item open at a time. So often I just want to open them <i>all</i>, and probably wish you hadn’t collapsed them in the first place. Well, at least if people start doing it this way I can make a simple user script to just remove name attributes from <details> elements.
I wish I'll be able to use the CloseWatcher API to replace my history API hack to close dialogs. As always, we're now waiting for browser support