Opera frames BUG?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

var G = function (id) {return document.getElementById(id); }
var C = function (tag) {return document.createElement(tag); }

window.onload = function ()
var f = C('frame');
f.name = 'my';
f.id = 'my';
f.src = 'about:blank';



<frameset id="content" rows="100%,*" cols="*" frameborder="no" border="0" framespacing="0">

alert('test'); // Remove this line, Opera load is not successful. why? IE Firefox Chrome Safari No problem...



Yay, another about:blank load timing problem.. It's really hard to get this right: http://hsivonen.iki.fi/about-blank/

Anyway, when Opera does a simple thing like this differently from everybody else it's by definition a bug in Opera. I have reported "CORE-45144 - window.frames collection not immediately updated when FRAME is appended to FRAMESET through DOM (appendChild and friends)" so it should be fixed in due course. There is an on-going maintenance project that might solve this issue among others, results won't make it for Opera 12 but quite likely the next majorish update.

If you need a workaround, just use setTimeout() with some small timeout value to delay the code that writes to the new frame slightly.

Thanks for bringing this to my attention :-)


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us Javascript

©2020 All rights reserved.