mshtml: Added support for indexed access to form elements.

This commit is contained in:
Jacek Caban 2011-03-03 15:18:26 +01:00 committed by Alexandre Julliard
parent fa7c08820b
commit 0af2a117c3
1 changed files with 14 additions and 0 deletions

View File

@ -534,6 +534,20 @@ static HRESULT HTMLFormElement_get_dispid(HTMLDOMNode *iface,
return E_FAIL;
}
if(len > MSHTML_CUSTOM_DISPID_CNT)
len = MSHTML_CUSTOM_DISPID_CNT;
/* FIXME: Implement in more generic way */
if('0' <= *name && *name <= '9') {
WCHAR *end_ptr;
i = strtoulW(name, &end_ptr, 10);
if(!*end_ptr && i < len) {
*pid = MSHTML_DISPID_CUSTOM_MIN + i;
return S_OK;
}
}
nsAString_InitDepend(&nsname, nameW);
nsAString_Init(&nsstr, NULL);
for(i = 0; i < len; ++i) {