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()
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.
Bug | Click to Test | IE5.0PC | IE5Mac | Saf 1.x | Konq 3.x | Op 7.10 | ICE 5.4.1 |
---|---|---|---|---|---|---|---|
no "instanceof" operator |
if ({} instanceof Object) {} alert('ok')
|
X | |||||
no boolean "in" operator |
if ('a' in window) {} alert('ok')
|
X | X | ||||
problem parsing implied semi-colon |
try{throw new Error('boo')} catch(e) {} alert('ok')
|
X | ok in 3.2, X prior | ||||
problem parsing named functions |
function noop(f) {}; noop(function foobar() {}); alert('ok')
|
X | X | ||||
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')
|
X | X | X | ? | ||
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);
|
X | X | X | ok in 7.5, X prior | X | |
missing encodeURIComponent and decodeURIComponent |
encodeURIComponent('a'); decodeURIComponent('a'); alert('ok')
|
X | X | ok in 1.2, X prior | ok 3.2, X prior | ||
missing Number.toFixed (and toPrecision, toExponential) |
(.51).toFixed(0); alert('ok')
|
X | X | X | ok 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')
|
X | X | ||||
no String.replace(RegExp, Function) |
if (("aaa").replace(/(\w)/g, function() {return 'b'}) == 'bbb') alert('ok');
|
X | X | X | ok in 3.2, X prior | burst||
setTimeout of a function |
setTimeout(function() {alert('ok')},0)
|
ok in 1.2, X prior | ok 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 |
Browser | script itself | expando = Function | expando = String | setAttribute String | addEventListener | attachEvent |
---|---|---|---|---|---|---|
Mozilla 1.7b | Y | Y | Y | Y | ||
IE5.0 Win | Y | |||||
Opera 7.5 | Y | |||||
Safari 1.2 | (doesn't work at all) |
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:
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 replaceTo run the test:
Family | Brand Version | Passes | Comment |
---|---|---|---|
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 |