本文整理汇总了C++中HTMLSelectElement::options方法的典型用法代码示例。如果您正苦于以下问题:C++ HTMLSelectElement::options方法的具体用法?C++ HTMLSelectElement::options怎么用?C++ HTMLSelectElement::options使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTMLSelectElement
的用法示例。
在下文中一共展示了HTMLSelectElement::options方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: notHandledByInterceptor
v8::Handle<v8::Value> V8HTMLSelectElement::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLSelectElement.NamedPropertyGetter");
HTMLSelectElement* select = V8HTMLSelectElement::toNative(info.Holder());
v8::Handle<v8::Value> value = info.Holder()->GetRealNamedPropertyInPrototypeChain(name);
if (!value.IsEmpty())
return value;
// Search local callback properties next to find IDL defined properties.
if (info.Holder()->HasRealNamedCallbackProperty(name))
return notHandledByInterceptor();
PassRefPtr<HTMLOptionsCollection> collection = select->options();
Vector<RefPtr<Node> > items;
collection->namedItems(v8StringToAtomicWebCoreString(name), items);
if (!items.size())
return notHandledByInterceptor();
if (items.size() == 1)
return toV8(items.at(0).release());
NodeList* list = new V8NamedNodesCollection(items);
return toV8(list);
}
示例2: optionsAttrGetter
static v8::Handle<v8::Value> optionsAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.HTMLSelectElement.options._get");
HTMLSelectElement* imp = V8HTMLSelectElement::toNative(info.Holder());
if (!R_check(imp)) return v8::Handle<v8::Value>(v8::Undefined());
return toV8(imp->options());
}
示例3: options
HRESULT STDMETHODCALLTYPE DOMHTMLSelectElement::options(
/* [retval][out] */ IDOMHTMLOptionsCollection** result)
{
if (!result)
return E_POINTER;
ASSERT(m_element);
HTMLSelectElement* selectElement = toHTMLSelectElement(m_element);
if (!selectElement->options())
return E_FAIL;
*result = 0;
RefPtr<HTMLOptionsCollection> options = selectElement->options();
*result = DOMHTMLOptionsCollection::createInstance(options.get());
return S_OK;
}
示例4: jsHTMLSelectElementOptions
JSValue jsHTMLSelectElementOptions(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->options()));
return result;
}
示例5: options
HRESULT STDMETHODCALLTYPE DOMHTMLSelectElement::options(
/* [retval][out] */ IDOMHTMLOptionsCollection** result)
{
if (!result)
return E_POINTER;
*result = 0;
ASSERT(m_element);
ASSERT(m_element->hasTagName(selectTag));
HTMLSelectElement* selectElement = static_cast<HTMLSelectElement*>(m_element);
if (!selectElement->options())
return E_FAIL;
*result = DOMHTMLOptionsCollection::createInstance(selectElement->options().get());
return S_OK;
}