❗window-reflecting body element event handlers
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
browser ⟩ event ⟩ handler ⟩ window-reflecting body element event handlers
Window-reflecting body element event handlers:
if you assign one of the following event handlers on document.body, it will be reflected on window too, and vice versa.
onblur, onerror, onfocus, onload, onresize, onscroll
const body = document.body;
body.onblur = function f(){}; // assigned on body
window.onblur // f: reflected on window
window.onresize =
📗 Medium