зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1581925 - Part 2: Use {chrome/content}-document-global-created topic to create SpecialPowers actor, r=kmag
This replaces the old DOMWindowCreated event, and allows SpecialPowers to still be instantiated for each new chrome document. Differential Revision: https://phabricator.services.mozilla.com/D47337 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
e549d2cdb8
Коммит
5ae1be845f
|
@ -38,9 +38,10 @@ this.specialpowers = class extends ExtensionAPI {
|
|||
includeChrome: true,
|
||||
child: {
|
||||
moduleURI: "resource://specialpowers/SpecialPowersChild.jsm",
|
||||
events: {
|
||||
DOMWindowCreated: {},
|
||||
},
|
||||
observers: [
|
||||
"chrome-document-global-created",
|
||||
"content-document-global-created",
|
||||
],
|
||||
},
|
||||
parent: {
|
||||
moduleURI: "resource://specialpowers/SpecialPowersParent.jsm",
|
||||
|
|
|
@ -187,9 +187,9 @@ class SpecialPowersChild extends JSWindowActorChild {
|
|||
this._extensionListeners = null;
|
||||
}
|
||||
|
||||
handleEvent(aEvent) {
|
||||
// We don't actually care much about the "DOMWindowCreated" event.
|
||||
// We only listen to it to force creation of the actor.
|
||||
observe(aSubject, aTopic, aData) {
|
||||
// Ignore the "{chrome/content}-document-global-created" event. It
|
||||
// is only observed to force creation of the actor.
|
||||
}
|
||||
|
||||
actorCreated() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче