window.onmessage = event => { if (event.data === "print") { window.print(); } };
top of page
bottom of page