本文整理汇总了C++中JSHTMLSelectElement::impl方法的典型用法代码示例。如果您正苦于以下问题:C++ JSHTMLSelectElement::impl方法的具体用法?C++ JSHTMLSelectElement::impl怎么用?C++ JSHTMLSelectElement::impl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JSHTMLSelectElement
的用法示例。
在下文中一共展示了JSHTMLSelectElement::impl方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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;
}
示例3: 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;
}
示例4: 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;
}
示例5: 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;
}
示例6: 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);
}
示例7: 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());
}
示例8: 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);
}
示例9: 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);
}
示例10: 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());
}
示例11: 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));
}
示例12: setJSHTMLSelectElementSize
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));
}
示例13: setJSHTMLSelectElementRequired
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));
}
示例14: setJSHTMLSelectElementName
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));
}