mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-08 14:15:45 +01:00
Manually add list of global object properties to global objects.
--HG-- extra : rebase_source : 53318cbfe4a044e6bbf9facb1ce6bc5933ba6fd9
This commit is contained in:
@@ -39,7 +39,8 @@ const JavaScript = Module("javascript", {
|
||||
return;
|
||||
|
||||
let seen = {};
|
||||
for (let key in properties(obj, !toplevel)) {
|
||||
let globals = values(toplevel && Class.objectGlobal(obj) === obj ? JavaScript.globalNames : []);
|
||||
for (let key in iterAll(globals, properties(obj, !toplevel))) {
|
||||
set.add(seen, key);
|
||||
yield key;
|
||||
}
|
||||
@@ -587,6 +588,17 @@ const JavaScript = Module("javascript", {
|
||||
*/
|
||||
completers: {},
|
||||
|
||||
/**
|
||||
* A list of properties of the global object which are not
|
||||
* enumerable by any standard method.
|
||||
*/
|
||||
globalNames: ["Array", "Boolean", "Date", "Error", "EvalError",
|
||||
"Function", "Infinity", "Math", "NaN", "Number", "Object",
|
||||
"RangeError", "ReferenceError", "RegExp", "String",
|
||||
"SyntaxError", "TypeError", "URIError", "decodeURI",
|
||||
"decodeURIComponent", "encodeURI", "encodeURIComponent", "eval",
|
||||
"isFinite", "isNaN", "parseFloat", "parseInt", "undefined"],
|
||||
|
||||
/**
|
||||
* Installs argument string completers for a set of functions.
|
||||
* The second argument is an array of functions (or null
|
||||
|
||||
Reference in New Issue
Block a user