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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user