diff options
Diffstat (limited to 'toolkit/components/extensions/test/mochitest/head.js')
-rw-r--r-- | toolkit/components/extensions/test/mochitest/head.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/toolkit/components/extensions/test/mochitest/head.js b/toolkit/components/extensions/test/mochitest/head.js new file mode 100644 index 000000000..1b1a29472 --- /dev/null +++ b/toolkit/components/extensions/test/mochitest/head.js @@ -0,0 +1,13 @@ +"use strict"; + +/* exported waitForLoad */ + +function waitForLoad(win) { + return new Promise(resolve => { + win.addEventListener("load", function listener() { + win.removeEventListener("load", listener, true); + resolve(); + }, true); + }); +} + |