зеркало из https://github.com/mozilla/gecko-dev.git
Bug 637019 - Select element should fallback to ElementSH resolve hook. r=bzbarsky, a=blocker
This commit is contained in:
Родитель
d6e7609177
Коммит
71a5cb82e3
|
@ -9421,11 +9421,13 @@ nsHTMLSelectElementSH::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext
|
|||
*objp = obj;
|
||||
*_retval = JS_DefineElement(cx, obj, n, JSVAL_VOID, nsnull, nsnull,
|
||||
JSPROP_ENUMERATE | JSPROP_SHARED);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
return nsElementSH::NewResolve(wrapper, cx, obj, id, flags, objp, _retval);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -15,7 +15,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=633133
|
|||
<div id="content" style="display: none">
|
||||
<div id='foo'></div>
|
||||
<div name='bar'></div>
|
||||
<select id="select">
|
||||
<select id="select" onchange="var foo = 'bar';">
|
||||
<option>option1</option>
|
||||
<option>option2</option>
|
||||
</select>
|
||||
|
@ -39,6 +39,8 @@ ok(1 in select, "in works");
|
|||
is(select[1].text, "option2", "can get it too");
|
||||
ok(!(2 in select), "in works for elements out of range");
|
||||
is(select[2], undefined, "can get them too and they're undefined");
|
||||
isnot(select.onchange, undefined, "select.onchange shouldn't be undefined");
|
||||
is(typeof(select.onchange), 'function', "select.onchange should be a function");
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
|
|
Загрузка…
Ссылка в новой задаче