void setJSHTMLSelectElementLength(ExecState* exec, JSObject* thisObject, JSValue value) { JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(thisObject); HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); ExceptionCode ec = 0; imp->setLength(value.toUInt32(exec), ec); setDOMException(exec, ec); }
EncodedJSValue JSC_HOST_CALL jsHTMLSelectElementPrototypeFunctionRemove(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSHTMLSelectElement::s_info)) return throwVMTypeError(exec); JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(asObject(thisValue)); return JSValue::encode(castedThis->remove(exec)); }
JSValue jsHTMLSelectElementLabels(ExecState* exec, JSValue slotBase, const Identifier&) { JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(asObject(slotBase)); UNUSED_PARAM(exec); HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->labels())); return result; }
JSValue jsHTMLSelectElementSize(ExecState* exec, JSValue slotBase, const Identifier&) { JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(asObject(slotBase)); UNUSED_PARAM(exec); HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); JSValue result = jsNumber(imp->size()); return result; }
JSValue jsHTMLSelectElementRequired(ExecState* exec, JSValue slotBase, const Identifier&) { JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(asObject(slotBase)); UNUSED_PARAM(exec); HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); JSValue result = jsBoolean(imp->hasAttribute(WebCore::HTMLNames::requiredAttr)); return result; }
JSValue jsHTMLSelectElementValidationMessage(ExecState* exec, JSValue slotBase, const Identifier&) { JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(asObject(slotBase)); UNUSED_PARAM(exec); HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); JSValue result = jsString(exec, imp->validationMessage()); return result; }
EncodedJSValue JSC_HOST_CALL jsHTMLSelectElementPrototypeFunctionCheckValidity(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSHTMLSelectElement::s_info)) return throwVMTypeError(exec); JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(asObject(thisValue)); HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); JSC::JSValue result = jsBoolean(imp->checkValidity()); return JSValue::encode(result); }
EncodedJSValue JSC_HOST_CALL jsHTMLSelectElementPrototypeFunctionSetCustomValidity(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSHTMLSelectElement::s_info)) return throwVMTypeError(exec); JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(asObject(thisValue)); HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); const String& error(valueToStringWithUndefinedOrNullCheck(exec, exec->argument(0))); if (exec->hadException()) return JSValue::encode(jsUndefined()); imp->setCustomValidity(error); return JSValue::encode(jsUndefined()); }
EncodedJSValue JSC_HOST_CALL jsHTMLSelectElementPrototypeFunctionNamedItem(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSHTMLSelectElement::s_info)) return throwVMTypeError(exec); JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(asObject(thisValue)); HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); const String& name(ustringToString(exec->argument(0).toString(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->namedItem(name))); return JSValue::encode(result); }
EncodedJSValue JSC_HOST_CALL jsHTMLSelectElementPrototypeFunctionItem(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSHTMLSelectElement::s_info)) return throwVMTypeError(exec); JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(asObject(thisValue)); HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); int index(exec->argument(0).toUInt32(exec)); if (index < 0) { setDOMException(exec, INDEX_SIZE_ERR); return JSValue::encode(jsUndefined()); } if (exec->hadException()) return JSValue::encode(jsUndefined()); JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->item(index))); return JSValue::encode(result); }
EncodedJSValue JSC_HOST_CALL jsHTMLSelectElementPrototypeFunctionAdd(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); if (!thisValue.inherits(&JSHTMLSelectElement::s_info)) return throwVMTypeError(exec); JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(asObject(thisValue)); HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); ExceptionCode ec = 0; HTMLElement* element(toHTMLElement(exec->argument(0))); if (exec->hadException()) return JSValue::encode(jsUndefined()); HTMLElement* before(toHTMLElement(exec->argument(1))); if (exec->hadException()) return JSValue::encode(jsUndefined()); imp->add(element, before, ec); setDOMException(exec, ec); return JSValue::encode(jsUndefined()); }
JSValue JSHTMLOptionsCollection::remove(ExecState* exec, const ArgList& args) { HTMLOptionsCollection* imp = static_cast<HTMLOptionsCollection*>(impl()); JSHTMLSelectElement* base = static_cast<JSHTMLSelectElement*>(asObject(toJS(exec, globalObject(), imp->base()))); return base->remove(exec, args); }
JSValue JSHTMLOptionsCollection::remove(ExecState* exec) { HTMLOptionsCollection* imp = static_cast<HTMLOptionsCollection*>(impl()); JSHTMLSelectElement* base = jsCast<JSHTMLSelectElement*>(asObject(toJS(exec, globalObject(), imp->ownerNode()))); return base->remove(exec); }
JSValue JSHTMLSelectElement::indexGetter(ExecState* exec, JSValue slotBase, unsigned index) { JSHTMLSelectElement* thisObj = static_cast<JSHTMLSelectElement*>(asObject(slotBase)); return toJS(exec, thisObj->globalObject(), static_cast<HTMLSelectElement*>(thisObj->impl())->item(index)); }
JSValue jsHTMLSelectElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&) { JSHTMLSelectElement* domObject = static_cast<JSHTMLSelectElement*>(asObject(slotBase)); return JSHTMLSelectElement::getConstructor(exec, domObject->globalObject()); }
void setJSHTMLSelectElementName(ExecState* exec, JSObject* thisObject, JSValue value) { JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(thisObject); HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); imp->setName(valueToStringWithNullCheck(exec, value)); }
void setJSHTMLSelectElementSize(ExecState* exec, JSObject* thisObject, JSValue value) { JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(thisObject); HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); imp->setSize(value.toInt32(exec)); }
void setJSHTMLSelectElementRequired(ExecState* exec, JSObject* thisObject, JSValue value) { JSHTMLSelectElement* castedThis = static_cast<JSHTMLSelectElement*>(thisObject); HTMLSelectElement* imp = static_cast<HTMLSelectElement*>(castedThis->impl()); imp->setBooleanAttribute(WebCore::HTMLNames::requiredAttr, value.toBoolean(exec)); }