static void init(Scriptable scope, boolean sealed) { NativeMath obj = new NativeMath(); obj.activatePrototypeMap(MAX_ID); obj.setPrototype(Js.getObjectPrototype(scope)); obj.setParentScope(scope); if (sealed) { obj.sealObject(); } Js.defineProperty(scope, "Math", obj, ScriptableObject.DONTENUM); }