1 2 3 4 5 6 7 8 9 10 11 12 13
"use strict"; /* exported waitForLoad */ function waitForLoad(win) { return new Promise(resolve => { win.addEventListener("load", function listener() { win.removeEventListener("load", listener, true); resolve(); }, true); }); }