Source code
Revision control
Copy as Markdown
Other Tools
export let x = 0;
export function increment() {
x++;
};
export const importedObject = object;
const importDevTools = ChromeUtils.importESModule("resource://test/es6module_devtoolsLoader.js", { global: "devtools" });
export const importESModuleDevTools = importDevTools.object;
const importShared = ChromeUtils.importESModule("resource://test/es6module_devtoolsLoader.js", { global: "shared" });
export const importESModuleShared = importShared.object;
const importCurrent = ChromeUtils.importESModule("resource://test/es6module_devtoolsLoader.js", { global: "current" });
export const importESModuleCurrent = importCurrent.object;
const importContextual = ChromeUtils.importESModule("resource://test/es6module_devtoolsLoader.js", { global: "contextual" });
export const importESModuleContextual = importContextual.object;
let caught = false;
try {
} catch (e) {
caught = true;
}
export const importESModuleNoOptionFailed1 = caught;
caught = false;
try {
} catch (e) {
caught = true;
}
export const importESModuleNoOptionFailed2 = caught;
const lazyDevTools = {};
ChromeUtils.defineESModuleGetters(lazyDevTools, {
}, { global: "devtools" });
export function importLazyDevTools() {
return lazyDevTools.object;
}
const lazyShared = {};
ChromeUtils.defineESModuleGetters(lazyShared, {
}, { global: "shared" });
export function importLazyShared() {
return lazyShared.object;
}
const lazyCurrent = {};
ChromeUtils.defineESModuleGetters(lazyCurrent, {
}, { global: "current" });
export function importLazyCurrent() {
return lazyCurrent.object;
}
const lazyContextual = {};
ChromeUtils.defineESModuleGetters(lazyContextual, {
}, { global: "contextual" });
export function importLazyContextual() {
return lazyContextual.object;
}
caught = false;
try {
let lazy = {};
ChromeUtils.defineESModuleGetters({}, {
});
} catch (e) {
caught = true;
}
export const importLazyNoOptionFailed1 = caught;
caught = false;
try {
let lazy = {};
ChromeUtils.defineESModuleGetters({}, {
}, {});
} catch (e) {
caught = true;
}
export const importLazyNoOptionFailed2 = caught;