Bug 1564761 [wpt PR 17620] - Document::CheckComplete should be nop when called from...
[gecko.git] / browser / extensions / screenshots / assertIsBlankDocument.js
blob2f393742153b7236488db761ea7ab9bca9ae18e2
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3  * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 /** For use inside an iframe onload function, throws an Error if iframe src is not blank.html
7     Should be applied *inside* catcher.watchFunction
8 */
9 this.assertIsBlankDocument = function assertIsBlankDocument(doc) {
10   if (doc.documentURI !== browser.extension.getURL("blank.html")) {
11     const exc = new Error("iframe URL does not match expected blank.html");
12     exc.foundURL = doc.documentURI;
13     throw exc;
14   }
16 null;