Opens print preview for the active tab.
This is an asynchronous function that returns a Promise
.An extension can detect when print preview has been closed by listening to the afterprint event:
window.addEventListener("afterprint", resumeFunction, false);