surrogate issues
Posted: Sat Mar 26, 2011 11:34 pm
NS 2.1, new profile, defaults NS settings
- !@* and @* match empty about:blank iframes (<iframe></iframe>) in Fx 3.6.16 and not in Fx 4.0.0. Just to be clear these are not frames whose document.URL is not yet returning the right url, but real about:blank frames. In 2.0.9.9 they didn't. I am guessing the 4.0.0 & 2.0.9.9 behavior is correct, maybe even more efficient, excluding about:blank early in the processing
- @* is invoked twice on a normal iframe (Fx 3.6.16, 4.0.0 is ok):
surrogate:page:Code: Select all
dump('@ surrogate - '+window.name+' : '+document.URL+'\n');
dump (also illustrates the first issue), f5 produces 1 dump for frame1, ctrl-f5 produces 2, and both produce 2 for frame2Code: Select all
<html> <head> <script> function evHandler(e) { dump(e.type + '\n'); } function writeFrame() { var w = document.getElementById('frame1').contentWindow; w.document.open(); //w.addEventListener('load', evHandler, false); //w.addEventListener('DOMContentLoaded', evHandler, false); w.document.write('doc.written'); w.document.close(); } function changeSource() { document.getElementById('frame1').src = 'empty.htm'; } </script> </head> <body> <button onclick="writeFrame();">write frame</button> <button onclick="changeSource();">change src</button><br> <iframe id="frame1" name="frame1"></iframe><br> <iframe id="frame2" name="frame2" src="empty.htm"></iframe> </body> </html>
Also, check the error console, there's an ABE LOCAL rule match for both the parent and the iframe, it doesn't stop the loading but why the message?Code: Select all
@ surrogate - : http://localhost/tests/iframe/docwritten.htm @ surrogate - frame1 : about:blank @ surrogate - frame2 : about:blank @ surrogate - frame1 : about:blank @ surrogate - frame2 : http://localhost/tests/iframe/empty.htm
- doc.written iframe does not invoke either @* or @!* in Fx 3.6.16, but does in Fx 4.0.0