mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-23 15:25:45 +01:00
Add Cs shortcut for Components.stack.
This commit is contained in:
@@ -6,6 +6,10 @@
|
|||||||
|
|
||||||
var { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
|
var { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
|
||||||
|
|
||||||
|
var Cs = Proxy(Components.stack, {
|
||||||
|
get: function Cs_get(target, prop) Components.stack.caller[prop]
|
||||||
|
});
|
||||||
|
|
||||||
function module(url) {
|
function module(url) {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
Cu.import(url, obj);
|
Cu.import(url, obj);
|
||||||
@@ -145,7 +149,7 @@ function require_(obj, name, from, targetName) {
|
|||||||
defineModule("base", {
|
defineModule("base", {
|
||||||
// sed -n 's/^(const|var|function) ([a-zA-Z0-9_]+).*/ "\2",/p' base.jsm | sort | fmt
|
// sed -n 's/^(const|var|function) ([a-zA-Z0-9_]+).*/ "\2",/p' base.jsm | sort | fmt
|
||||||
exports: [
|
exports: [
|
||||||
"ErrorBase", "Cc", "Ci", "Class", "Cr", "Cu", "Finished",
|
"ErrorBase", "Cc", "Ci", "Class", "Cr", "Cs", "Cu", "Finished",
|
||||||
"Module", "JSMLoader", "RealSet", "Set", "Struct", "StructBase",
|
"Module", "JSMLoader", "RealSet", "Set", "Struct", "StructBase",
|
||||||
"Timer", "UTF8", "XPCOM", "XPCOMShim", "XPCOMUtils",
|
"Timer", "UTF8", "XPCOM", "XPCOMShim", "XPCOMUtils",
|
||||||
"XPCSafeJSObjectWrapper", "array", "bind", "call", "callable",
|
"XPCSafeJSObjectWrapper", "array", "bind", "call", "callable",
|
||||||
|
|||||||
Reference in New Issue
Block a user