Wed, 31 Dec 2014 07:16:47 +0100
Revert simplistic fix pending revisit of Mozilla integration attempt.
michael@0 | 1 | <html xmlns="http://www.w3.org/1999/xhtml"> |
michael@0 | 2 | <head> |
michael@0 | 3 | <bindings xmlns="http://www.mozilla.org/xbl"> |
michael@0 | 4 | <binding id="test"> |
michael@0 | 5 | <content> |
michael@0 | 6 | <span><children/></span> |
michael@0 | 7 | </content> |
michael@0 | 8 | </binding> |
michael@0 | 9 | </bindings> |
michael@0 | 10 | <script type="application/x-javascript"> |
michael@0 | 11 | function runTest() { |
michael@0 | 12 | var div = document.getElementById("testDiv"); |
michael@0 | 13 | |
michael@0 | 14 | // First we have to make sure that we've looked up the primary frame for |
michael@0 | 15 | // the previous child span. Appending text to it should do the trick. |
michael@0 | 16 | div.firstChild. |
michael@0 | 17 | appendChild(document.createTextNode("This is text in a div ")); |
michael@0 | 18 | |
michael@0 | 19 | // Now flush out reflow |
michael@0 | 20 | document.body.offsetWidth; |
michael@0 | 21 | |
michael@0 | 22 | var node = document.createElementNS("http://www.w3.org/1999/xhtml", |
michael@0 | 23 | "span"); |
michael@0 | 24 | div.appendChild(node); |
michael@0 | 25 | node.appendChild(document.createTextNode("This text should appear")); |
michael@0 | 26 | } |
michael@0 | 27 | </script> |
michael@0 | 28 | </head> |
michael@0 | 29 | |
michael@0 | 30 | <body onload="runTest()"> |
michael@0 | 31 | <div id="testDiv" style="width: 0; -moz-binding: url(#test)"><span></span></div> |
michael@0 | 32 | |
michael@0 | 33 | </body> |
michael@0 | 34 | </html> |