Browser Bugs

This table does not purport to list even all the bugs that we work around in the library, let alone all the many CSS and DOM bugs that exist. Rather this just lists a few browser bugs that are particularly egregious or hard to work around cleanly, and so affect our ability to support the browser with our library.

For some general discussion of available browsers, see browsers.html .

All of these tests pass on: Mozilla 1.4a, IE6, Opera 7.5. It is only the KHTML browser family that is still shipping product with such basic bugs at the ECMAScript language level.

Oh, and guess what? I can crash the entire Safari 1.2 browser (click to make it happen):

crash_safari()
View source for more information.

These bugs have been reported to Apple as Bug ID# 3656443. They have also been reported to KDE as Bug 81728 .

An "X" means it has the bug.

burst
BugClick to TestIE5.0PCIE5MacSaf 1.xKonq 3.xOp 7.10ICE 5.4.1
no "instanceof" operator
if ({} instanceof Object) {} alert('ok')
X
no boolean "in" operator
if ('a' in window) {} alert('ok')
XX
problem parsing implied semi-colon
try{throw new Error('boo')} catch(e) {} alert('ok')
Xok in 3.2, X prior
problem parsing named functions
function noop(f) {}; noop(function foobar() {}); alert('ok')
XX
missing Node.addEventListener and Node.attachEvent
if (document.body.addEventListener || document.body.attachEvent) alert('ok')
X
missing Document.createEvent and Document.createEventObject
if (document.createEventObject) alert('ok'); else if (document.createEvent && (typeof document.createEvent('MouseEvents').initMouseEvent == 'function')) alert('ok')
XXX?
can't load a script via createElement('script')
(all can do a document.write creation before onload)
var el = document.createElement('script'); el.src = 'bb_script.js'; document.body.appendChild(el);
XXXok in 7.5, X priorX
missing encodeURIComponent and decodeURIComponent
encodeURIComponent('a'); decodeURIComponent('a'); alert('ok')
XXok in 1.2, X priorok 3.2, X prior
missing Number.toFixed (and toPrecision, toExponential)
(.51).toFixed(0); alert('ok')
XXXok in 3.2, X prior
inconsistent Math.floor and Math.round on large numbers
var n = 1000000000000000; if (Math.floor(n+0.5) == Math.round(n)) alert('ok')
XX
no String.replace(RegExp, Function)
if (("aaa").replace(/(\w)/g, function() {return 'b'}) == 'bbb') alert('ok');
XXXok in 3.2, X prior
setTimeout of a function
setTimeout(function() {alert('ok')},0)
ok in 1.2, X priorok in 3.2, X prior
buggy Array.concat
if (1 == [].concat([['a']][0]).length) alert('ok')
ok in 3.1, X prior
return out of some nested switch statements
/* view source to see test_switch() */ if (test_switch()) alert('ok')
ok in 3.1, X prior

Dynamic script Support

The W3 standards say nothing about an "onload" handler for script elements (or img elements for that matter: just document, frames, and object). In practice, using the test listed in the table above, here is what we have found for dynamically created script elements:
Browserscript itselfexpando = Functionexpando = StringsetAttribute StringaddEventListenerattachEvent
Mozilla 1.7bYYYY
IE5.0 WinY
Opera 7.5Y
Safari 1.2(doesn't work at all)

Dynamic iframe Support

For iframe support, the situation is complicated because the standards are not always clear, and there are many issues. This test and table doesn't even cover all the things that affect us (such as whether "display: none" disables an iframe).

For iframe-based data channel with an onload event independent of the particular url and its content, a browser needs to have support for at least one of:

The above criteria still leave out Konqueror and ICE family browsers. Note that KDE recently added support for W3 "Load and Save", which means that an iframe data channel is not as critical for Konqueror. (See Peter Kelley, http://marc.theaimsgroup.com/?l=kfm-devel&m=105618985421366&w=2 ). Also, Safari recently added XMLHttpRequest support.

To see the source of the test (what each of the letter codes for passes mean) do view source. A quick partial guide:

   1   iframe element onload (element created with createElement)
   A   iframe element onload (element created with innerHTML)
   3   iframe window onload with no src
   5-  iframe body onload (body created with document.write)
   5+  iframe body onload (overridden programmatically)
   Y   nested iframe element onload, from element in iframe body (created with document.write)
   7   iframe element onload after replace
To run the test:
click here to run test_iframe()

FamilyBrand VersionPassesComment
IE 6.0 BAC82945-XY69 Notice 9 twice. with slight changes to test, can get BAC82465+XY9
IE 5.0 BC5-X69
Mozilla Mozilla 1.4a CBA28143XY5-3697 perfect except for 5+ vs. 5-
Opera 7.10 BC8245-X69 only B8 if no previous alert or setTimeout. security error if write to winempty.
Opera 7.5 CB284XY65+9A1717 note duplicate 1 and 7.
KHTML Safari 1.0 C245-6B89 parent is bad in 5- for v73 but ok in 1.0. Both ok in test 8. crashes if write to winstatic.
KHTML Safari 1.2 C245-6XY8197
KHTML Konqueror 3.1.0 CB28 only finds window.frames by index.
ICE 5.4 BC824X69 only B8 if no previous alert or setTimeout