Provide snarf and load functions.

git-svn-id: svn://10.0.0.236/trunk@175516 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mrbkap%gmail.com
2005-07-02 04:55:29 +00:00
parent ba78ee1c0c
commit 60bb3047c4

View File

@@ -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.