Some event attributes are now limited to body and frameset

Published: | Categories: DOM


Previously, the onbeforeunload attribute has been recognized even if it has been set on any elements, and the named handler is called when the event is fired. To comply with the spec, it’s now ignored when it has been set on elements other than body and <frameset>. The other attributes treated the same include onafterprint, onbeforeprint, onhashchange, onoffline, ononline, onpagehide, onpageshow, onpopstate, onresize and onunload.