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