本文整理汇总了C++中JSHTMLSelectElement类的典型用法代码示例。如果您正苦于以下问题:C++ JSHTMLSelectElement类的具体用法?C++ JSHTMLSelectElement怎么用?C++ JSHTMLSelectElement使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了JSHTMLSelectElement类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setJSHTMLSelectElementLength
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);
}
示例2: jsHTMLSelectElementPrototypeFunctionRemove
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));
}
示例3: jsHTMLSelectElementLabels
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;
}
示例4: jsHTMLSelectElementSize
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;
}
示例5: jsHTMLSelectElementRequired
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;
}
示例6: jsHTMLSelectElementValidationMessage
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;
}
示例7: jsHTMLSelectElementPrototypeFunctionCheckValidity
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);
}
示例8: jsHTMLSelectElementPrototypeFunctionSetCustomValidity
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());
}
示例9: jsHTMLSelectElementPrototypeFunctionNamedItem
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);
}
示例10: jsHTMLSelectElementPrototypeFunctionItem
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);
}
示例11: jsHTMLSelectElementPrototypeFunctionAdd
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());
}
示例12: globalObject
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);
}
示例13: globalObject
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);
}
示例14: indexGetter
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));
}
示例15: jsHTMLSelectElementConstructor
JSValue jsHTMLSelectElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
{
JSHTMLSelectElement* domObject = static_cast<JSHTMLSelectElement*>(asObject(slotBase));
return JSHTMLSelectElement::getConstructor(exec, domObject->globalObject());
}