summaryrefslogtreecommitdiffstats
path: root/toolkit/components/extensions/test/mochitest/head.js
blob: 1b1a294726bb609c17790701fe12c2908867eebb (plain)
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);
  });
}