Notes |
|
|
Confirmed reproducible with CI #3315 |
|
|
|
Test case, thanks to jmb:
<!DOCTYPE html>
<script type="text/javascript">
var x = document.createElement("p");
for (var g = ['modernizr','tspan']; !x.style;) { x.modElem =
document.createElement(g.shift()); x.style = x.modElem.style;
}
</script> |
|
|
|
Here's a less-minified version (which also reflects reality better than the above):
<script type="text/javascript">
var modElem = { elem: document.createElement('modernizr') };
var mStyle = { style: modElem.elem.style };
var elems = [ 'modernizr', 'tspan' ];
while (!mStyle.style) {
mStyle.modElem = document.createElement(elems.shift());
mStyle.style = mStyle.modElem.style;
}
</script>
So, the actual problem here is that HTMLElement.style is unimplemented so, whenever it is read, we return undefined. This results in the loop above never terminating, and disappointment.
The test case Michael posted also exposes another bug:
document.createElement("p") should create an HTMLParagraphElement -- it doesn't, as dukky_push_node_klass asks for PROTO(HTML) + P + ELEMENT (i.e. PROTO(HTMLPELEMENT), rather than PROTO(HTMLPARAGRAPHELEMENT). |
|
|
|
I see some work has been done on this bug. With #3330 neither the BBC home page nor the test case 1161 above go into an endless loop as previously.
(For some reason I am not getting email notifications from the bug tracker of additions to the threads. I shall have to pay attention manually.) |
|
|
|
2420 tracks the bogus prototype stuff, so closing. |
|
|
|
Confirmed fixed in 3.4 release |
|