1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-30 11:55:46 +01:00

Do something remotely reasonable where designMode documents are concerned. Some fixes for evalInSandbox problems in recent nightlies.

This commit is contained in:
Kris Maglione
2010-10-24 20:21:14 -04:00
parent 6f95b33694
commit dc38a2208c
8 changed files with 86 additions and 76 deletions

View File

@@ -485,8 +485,11 @@ function isObject(obj) typeof obj === "object" && obj != null;
* any window, frame, namespace, or execution context, which
* is not the case when using (obj instanceof Array).
*/
const isArray = Array.isArray ||
function isArray(val) objproto.toString.call(val) == "[object Array]";
const isArray =
Array.isArray
// This is bloody stupid.
? function isArray(val) Array.isArray(val) || val && val.constructor && val.constructor.name === "Array"
: function isArray(val) objproto.toString.call(val) == "[object Array]";
/**
* Returns true if and only if its sole argument is an