Source code
Revision control
Copy as Markdown
Other Tools
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
/* eslint-env mozilla/frame-script */
function _contentPaintHandler() {
var utils = content.windowUtils;
if (utils.isMozAfterPaintPending) {
addEventListener(
"MozAfterPaint",
function afterpaint() {
removeEventListener("MozAfterPaint", afterpaint, true);
sendAsyncMessage("PageLoader:LoadEvent", {});
},
true
);
} else {
sendAsyncMessage("PageLoader:LoadEvent", {});
}
}
addEventListener(
"load",
// eslint-disable-next-line no-undef
contentLoadHandlerCallback(_contentPaintHandler),
true
);