mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-14 03:07:31 +09:00
Move WebExtensions enabled Add-ons Manager
This commit is contained in:
parent
d7d16e7fbb
commit
358cd0404a
1100 changed files with 133 additions and 106 deletions
29
toolkit/mozapps/webextensions/test/addons/bootstrap_globals/bootstrap.js
vendored
Normal file
29
toolkit/mozapps/webextensions/test/addons/bootstrap_globals/bootstrap.js
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
var seenGlobals = new Set();
|
||||
var scope = this;
|
||||
function checkGlobal(name, type) {
|
||||
if (scope[name] && typeof(scope[name]) == type)
|
||||
seenGlobals.add(name);
|
||||
}
|
||||
|
||||
var wrapped = {};
|
||||
Services.obs.notifyObservers({ wrappedJSObject: wrapped }, "bootstrap-request-globals", null);
|
||||
for (let [name, type] of wrapped.expectedGlobals) {
|
||||
checkGlobal(name, type);
|
||||
}
|
||||
|
||||
function install(data, reason) {
|
||||
}
|
||||
|
||||
function startup(data, reason) {
|
||||
Services.obs.notifyObservers({
|
||||
wrappedJSObject: seenGlobals
|
||||
}, "bootstrap-seen-globals", null);
|
||||
}
|
||||
|
||||
function shutdown(data, reason) {
|
||||
}
|
||||
|
||||
function uninstall(data, reason) {
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
|
||||
|
||||
<Description about="urn:mozilla:install-manifest">
|
||||
<em:id>bootstrap_globals@tests.mozilla.org</em:id>
|
||||
<em:version>1.0</em:version>
|
||||
<em:bootstrap>true</em:bootstrap>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Test Bootstrap Globals</em:name>
|
||||
|
||||
<em:targetApplication>
|
||||
<Description>
|
||||
<em:id>xpcshell@tests.mozilla.org</em:id>
|
||||
<em:minVersion>1</em:minVersion>
|
||||
<em:maxVersion>1</em:maxVersion>
|
||||
</Description>
|
||||
</em:targetApplication>
|
||||
|
||||
</Description>
|
||||
</RDF>
|
||||
Loading…
Add table
Add a link
Reference in a new issue