diff --git a/mozilla/js/narcissus/jsexec.js b/mozilla/js/narcissus/jsexec.js index 25ce359c301..c1d61ce70eb 100644 --- a/mozilla/js/narcissus/jsexec.js +++ b/mozilla/js/narcissus/jsexec.js @@ -121,7 +121,16 @@ var global = { TypeError: TypeError, URIError: URIError, // Other properties. - Math: Math + Math: Math, + + // Extensions to ECMA + snarf: snarf, + load: function load(s) { + if (typeof s != "string") + return s; + + evaluate(snarf(s), s, 1) + } }; // Reflect a host class into the target global environment by delegation.