JSValue JSC_HOST_CALL jsNamedNodeMapPrototypeFunctionRemoveNamedItemNS(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args) { UNUSED_PARAM(args); if (!thisValue.isObject(&JSNamedNodeMap::s_info)) return throwError(exec, TypeError); JSNamedNodeMap* castedThisObj = static_cast<JSNamedNodeMap*>(asObject(thisValue)); NamedNodeMap* imp = static_cast<NamedNodeMap*>(castedThisObj->impl()); ExceptionCode ec = 0; const UString& namespaceURI = valueToStringWithNullCheck(exec, args.at(0)); const UString& localName = args.at(1).toString(exec); JSC::JSValue result = toJS(exec, WTF::getPtr(imp->removeNamedItemNS(namespaceURI, localName, ec))); setDOMException(exec, ec); return result; }
EncodedJSValue JSC_HOST_CALL jsNamedNodeMapPrototypeFunctionRemoveNamedItemNS(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSNamedNodeMap::s_info)) return throwVMTypeError(exec); JSNamedNodeMap* castedThis = static_cast<JSNamedNodeMap*>(asObject(thisValue)); NamedNodeMap* imp = static_cast<NamedNodeMap*>(castedThis->impl()); ExceptionCode ec = 0; const String& namespaceURI(valueToStringWithNullCheck(exec, exec->argument(0))); if (exec->hadException()) return JSValue::encode(jsUndefined()); const String& localName(ustringToString(exec->argument(1).toString(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->removeNamedItemNS(namespaceURI, localName, ec))); setDOMException(exec, ec); return JSValue::encode(result); }