| Category | Event types |
|---|---|
| Network, printing | online, offline, beforeprint, afterprint |
| History, lifecycle | popstate, hashchange, pageshow, pagehide |
| Viewport | resize, scroll, scrollend, fullscreenchange |
| Clipboard | copy, cut, paste |
input.addEventListener("paste", (e) => {
e.preventDefault();
const text = e.clipboardData.getData("text").toUpperCase();
input.setRangeText(text, input.selectionStart, input.selectionEnd, "end");
});online only means a network link exists, so use it for hints. pageshow with persisted === true marks a return from the back/forward cache. Save state on visibilitychange or pagehide, because Chrome 1 no longer fires the deprecated unload by default.