EncodedJSValue jsattributeConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName) { JSattributePrototype* domObject = jsDynamicCast<JSattributePrototype*>(JSValue::decode(thisValue)); if (UNLIKELY(!domObject)) return throwVMTypeError(state); return JSValue::encode(JSattribute::getConstructor(state->vm(), domObject->globalObject())); }
EncodedJSValue jsattributeConstructor(ExecState* exec, JSObject* baseValue, EncodedJSValue, PropertyName) { JSattributePrototype* domObject = jsDynamicCast<JSattributePrototype*>(baseValue); if (!domObject) return throwVMTypeError(exec); return JSValue::encode(JSattribute::getConstructor(exec->vm(), domObject->globalObject())); }
bool setJSattributeConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue) { JSValue value = JSValue::decode(encodedValue); JSattributePrototype* domObject = jsDynamicCast<JSattributePrototype*>(JSValue::decode(thisValue)); if (UNLIKELY(!domObject)) { throwVMTypeError(state); return false; } // Shadowing a built-in constructor return domObject->putDirect(state->vm(), state->propertyNames().constructor, value); }