Exemplo n.º 1
0
		public static void SetBuiltinProtoAndParent(ScriptableObject @object, Scriptable scope, TopLevel.Builtins type)
		{
			scope = ScriptableObject.GetTopLevelScope(scope);
			@object.SetParentScope(scope);
			@object.SetPrototype(TopLevel.GetBuiltinPrototype(scope, type));
		}
Exemplo n.º 2
0
		public static void SetObjectProtoAndParent(ScriptableObject @object, Scriptable scope)
		{
			// Compared with function it always sets the scope to top scope
			scope = ScriptableObject.GetTopLevelScope(scope);
			@object.SetParentScope(scope);
			Scriptable proto = ScriptableObject.GetClassPrototype(scope, @object.GetClassName());
			@object.SetPrototype(proto);
		}