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