mirror of https://github.com/axmolengine/axmol.git
Made require overwritable
This commit is contained in:
parent
fe1336bdc7
commit
daac6ceb08
|
@ -426,7 +426,7 @@ void registerDefaultClasses(JSContext* cx, JS::HandleObject global) {
|
|||
JS_DefineFunction(cx, jsc, "executeScript", ScriptingCore::executeScript, 1, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE );
|
||||
|
||||
// register some global functions
|
||||
JS_DefineFunction(cx, global, "require", ScriptingCore::executeScript, 1, JSPROP_READONLY | JSPROP_PERMANENT);
|
||||
JS_DefineFunction(cx, global, "require", ScriptingCore::executeScript, 1, JSPROP_PERMANENT);
|
||||
JS_DefineFunction(cx, global, "log", ScriptingCore::log, 0, JSPROP_READONLY | JSPROP_PERMANENT);
|
||||
JS_DefineFunction(cx, global, "executeScript", ScriptingCore::executeScript, 1, JSPROP_READONLY | JSPROP_PERMANENT);
|
||||
JS_DefineFunction(cx, global, "forceGC", ScriptingCore::forceGC, 0, JSPROP_READONLY | JSPROP_PERMANENT);
|
||||
|
|
Loading…
Reference in New Issue