internal static void Init(Scriptable scope, bool @sealed) { Rhino.BaseFunction obj = new Rhino.BaseFunction(); // Function.prototype attributes: see ECMA 15.3.3.1 obj.prototypePropertyAttributes = DONTENUM | READONLY | PERMANENT; obj.ExportAsJSClass(MAX_PROTOTYPE_ID, scope, @sealed); }
public static void SetFunctionProtoAndParent(BaseFunction fn, Scriptable scope) { fn.SetParentScope(scope); fn.SetPrototype(ScriptableObject.GetFunctionPrototype(scope)); }