Note: I wrote this page whan I was very annoyed with Opera for releasing Opera 4, the worst browser ever (except for Explorer 3). Meanwhile Opera has redeemed itself by Opera 5, so this page is only maintained for historical reasons.
Opera 4 was a buggy browser. I published this bug list to see exactly what was
wrong with it. Meanwhile Opera has released Opera 5 and it's much better in
many respects. The only open issues are the minor security bug and document.getElementsByTagName.
See the data below for details.
All testing has been done on Windows in Opera 4.02 and Opera 5.
First of all some items that worked fine in Opera 3 but don't work in Opera 4:
<INPUT NAME="thename">Instead it required an ID, both in the HTML and in the JavaScript. Although this is in fact a correct implementation of the standards, Opera fails to provide backward compatibility with NAMEs in forms. Thus it makes sure that common form validation scripts won't work in Opera 4. This won't help to give them a larger share of the market.
Opera says:
"the event variable passed to event handlers does not match the javascript standard"
What does this mean? Why don't they give information on how the event variable works instead of telling us
how it doesn't work?
Incomplete information.
Opera claims that it supports a limited number of new DOM methods and properties on elements with absolute position. These claims are incorrect more often than not in Opera 4. Opera 5 fulfills most of the claims.
I set up a test page with as basic HTML:
<P ID="test">A paragraph with an ID.</P>
and as basic CSS:
#test {position: absolute; top: 100px; left: 100px; background: #00cc00; }
This is what happened:
Claim | Example script | Opera 4 | Opera 5 |
---|---|---|---|
Opera does not claim to support top and left, but in fact the browser supports these properties and their changing. | var x = document.getElementById('test').style; x.top = 150; |
Yes | |
Setting and getting of visibility |
var x = document.getElementById('test').style; x.visibility = 'hidden'; |
Yes | |
Setting and getting of pixelLeft and pixelTop | var x = document.getElementById('test').style; x.pixelLeft = 100; |
No | Yes |
Setting and getting of pixelWidth and pixelHeight | var x = document.getElementById('test').style; x.pixelHeight = 10; |
Buggy. The background conforms to the new width/height, but the actual content stays where it is. | |
Setting and getting of zIndex | var x = document.getElementById('test').style; x.zIndex = 20; |
No | Yes (note) |
Setting and getting of color and background. | var x = document.getElementById('test').style; x.background = "#ffffff"; x.color = "#ffffff"; |
No | Yes |
getElementById | var x = document.getElementById('test'); alert(x.id); |
Yes | |
getElementsByTagName | var x = document.getElementsByTagName('p'); |
No | |
getElementsByName | var x = document.getElementsByName('test')[0].style; x.color = "#ffffff"; |
No | Yes |
contains() Note: I don't know this method, but it is supported in Explorer 5 and not in Netscape 6. |
var x = document.getElementById('test'); if (x.contains) alert('Yep'); else alert('Nope'); |
No | Yes |
parentNode | var x = document.getElementById('test'); y = x.parentNode; y.style.visibility = 'hidden';I put an extra DIV with absolute position around the paragraph. |
Dunno exactly. The assignment of x.parentNode to y works, but the visibility change gives an error. | Yes |
z-index: Opera can't place two layers exactly on top of each other.