JSValue jsMutationEventAttrChange(ExecState* exec, JSValue slotBase, const Identifier&) { JSMutationEvent* castedThis = static_cast<JSMutationEvent*>(asObject(slotBase)); UNUSED_PARAM(exec); MutationEvent* imp = static_cast<MutationEvent*>(castedThis->impl()); JSValue result = jsNumber(imp->attrChange()); return result; }
JSValue jsMutationEventNewValue(ExecState* exec, JSValue slotBase, const Identifier&) { JSMutationEvent* castedThis = static_cast<JSMutationEvent*>(asObject(slotBase)); UNUSED_PARAM(exec); MutationEvent* imp = static_cast<MutationEvent*>(castedThis->impl()); JSValue result = jsString(exec, imp->newValue()); return result; }
JSValue jsMutationEventRelatedNode(ExecState* exec, JSValue slotBase, const Identifier&) { JSMutationEvent* castedThis = static_cast<JSMutationEvent*>(asObject(slotBase)); UNUSED_PARAM(exec); MutationEvent* imp = static_cast<MutationEvent*>(castedThis->impl()); JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->relatedNode())); return result; }
JSValue* jsMutationEventPrototypeFunctionInitMutationEvent(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args) { if (!thisValue->isObject(&JSMutationEvent::s_info)) return throwError(exec, TypeError); JSMutationEvent* castedThisObj = static_cast<JSMutationEvent*>(thisValue); MutationEvent* imp = static_cast<MutationEvent*>(castedThisObj->impl()); const UString& type = args[0]->toString(exec); bool canBubble = args[1]->toBoolean(exec); bool cancelable = args[2]->toBoolean(exec); Node* relatedNode = toNode(args[3]); const UString& prevValue = args[4]->toString(exec); const UString& newValue = args[5]->toString(exec); const UString& attrName = args[6]->toString(exec); unsigned short attrChange = args[7]->toInt32(exec); imp->initMutationEvent(type, canBubble, cancelable, relatedNode, prevValue, newValue, attrName, attrChange); return jsUndefined(); }
EncodedJSValue JSC_HOST_CALL jsMutationEventPrototypeFunctionInitMutationEvent(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSMutationEvent::s_info)) return throwVMTypeError(exec); JSMutationEvent* castedThis = static_cast<JSMutationEvent*>(asObject(thisValue)); ASSERT_GC_OBJECT_INHERITS(castedThis, &JSMutationEvent::s_info); MutationEvent* imp = static_cast<MutationEvent*>(castedThis->impl()); const String& type(ustringToString(exec->argument(0).toString(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); bool canBubble(exec->argument(1).toBoolean(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); bool cancelable(exec->argument(2).toBoolean(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); Node* relatedNode(toNode(exec->argument(3))); if (exec->hadException()) return JSValue::encode(jsUndefined()); const String& prevValue(ustringToString(exec->argument(4).toString(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); const String& newValue(ustringToString(exec->argument(5).toString(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); const String& attrName(ustringToString(exec->argument(6).toString(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); unsigned short attrChange(exec->argument(7).toUInt32(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); imp->initMutationEvent(type, canBubble, cancelable, relatedNode, prevValue, newValue, attrName, attrChange); return JSValue::encode(jsUndefined()); }
JSValue jsMutationEventConstructor(ExecState* exec, JSValue slotBase, const Identifier&) { JSMutationEvent* domObject = static_cast<JSMutationEvent*>(asObject(slotBase)); return JSMutationEvent::getConstructor(exec, domObject->globalObject()); }