static v8::Handle<v8::Value> lengthAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) { INC_STATS("DOM.HTMLSelectElement.length._get"); HTMLSelectElement* imp = V8HTMLSelectElement::toNative(info.Holder()); if (!R_check(imp)) return v8::Handle<v8::Value>(v8::Undefined()); return v8::Integer::NewFromUnsigned(imp->length()); }
JSValue jsHTMLSelectElementLength(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->length()); return result; }
HRESULT STDMETHODCALLTYPE DOMHTMLSelectElement::activateItemAtIndex( /* [in] */ int index) { ASSERT(m_element); HTMLSelectElement* selectElement = toHTMLSelectElement(m_element); if (index >= selectElement->length()) return E_FAIL; selectElement->setSelectedIndex(index); return S_OK; }
HRESULT STDMETHODCALLTYPE DOMHTMLSelectElement::activateItemAtIndex( /* [in] */ int index) { ASSERT(m_element); ASSERT(m_element->hasTagName(selectTag)); HTMLSelectElement* selectElement = static_cast<HTMLSelectElement*>(m_element); if (index >= selectElement->length()) return E_FAIL; selectElement->setSelectedIndex(index); return S_OK; }