Files
firefox/testing/specialpowers/content/specialpowersFrameScript.js
T
Brindusan Cristian 58f4e50cdc Backed out 2 changesets (bug 1481021) for bc failures on security/sandbox/test/browser_bug1393259.js.
Backed out changeset c53c7b0249ad (bug 1481021)
Backed out changeset 41bedc526dd6 (bug 1481021)
2018-08-08 03:22:16 +03:00

27 lines
785 B
JavaScript

"use strict";
/* globals attachSpecialPowersToWindow */
let mm = this;
ChromeUtils.import("resource://specialpowers/specialpowersAPI.js", this);
ChromeUtils.import("resource://specialpowers/specialpowers.js", this);
// This is a frame script, so it may be running in a content process.
// In any event, it is targeted at a specific "tab", so we listen for
// the DOMWindowCreated event to be notified about content windows
// being created in this context.
function SpecialPowersManager() {
addEventListener("DOMWindowCreated", this, false);
}
SpecialPowersManager.prototype = {
handleEvent: function handleEvent(aEvent) {
var window = aEvent.target.defaultView;
attachSpecialPowersToWindow(window, mm);
}
};
var specialpowersmanager = new SpecialPowersManager();