miscoded

the web is a hack

when live dies and start stops - Opera's problems with the new MS site framework

, , , , ,

Readers will have noticed the news about the new Microsoft portals live.com and start.com not being very interesting pages in Opera. They don't, in fact, do anything at all...

The sites are based on the same set of JavaScript libraries. One of these files is meant to be a "compatibility layer" for non-IE browsers. It basically "emulates" Internet Explorer JScript features so that the rest of the libraries can use such features without worrying about sniffing or browser compatibility.

To emulate JScript in such detail the authors have stated that they need certain browser functionality. They use a Mozilla extension to the ECMAScript standard, the ability to define "getters" and "setters" for object properties. Opera does not support this functionality (mainly because it is non-standard - not in the ECMA specifications - and not widely used.)

On the other hand, Opera has worked hard on being compatible with many of IE's extensions.

The irony! Microsoft's script library basically tells Opera "sorry, but you've spent all those years implementing the wrong standards violations! If you had copied Mozilla's violations rather than IE's we might make live.com and start.com work for you"..


As an aside: if you who are reading this are a FireFox-lover and standards advocate, go ask the mozilla.org crew some serious questions about why it is considered OK to embrace-and-extend ECMAScript. Isn't this a standards violation by another name? Getters and setters are worse than FONT or document.all - there isn't even a backward-compatibility story here. One single getter or setter definition in an object literal and the whole JavaScript library is unusable in other browsers. And you claim you're writing a standards-compliant browser??

Superiour popup blocker fails popup "test"a sudden misstep while dancing with blogger

Comments

larskl Tuesday, November 8, 2005 12:36:55 PM

I wondered whether we support IEs violations good enough to display the page if they'd just stop sending that Mozilla library stuff?

Hallvord R. M. Steenhallvors Thursday, November 10, 2005 10:30:54 AM

Larskl: possibly, the problem is that we DO need one or two of the utility functions defined in the Gecko library as far as I could see (I haven't analysed this entirely). Of course the whole library is useless to Opera because of get/set syntax in object literals.

Daniel Goldman: we do support the standard approach of HTMLElement.prototype.something=whatever;, which is to the best of my knowledge one form of "adding custom properties to base DOM objects".

Maian LeafbladeMaian Thursday, November 17, 2005 10:00:21 AM

Well, I personally am very thankful for those __defineSetter__ and __defineGetter__ extensions. It definitely simplifies converting IE-only pages to be Firefox-compatible. It's a pity Opera doesn't support its own mechanism for this. Something along the lines of magic properties for non-user JS scripts.

JeremyFanon Tuesday, April 18, 2006 9:38:07 PM

__defineGetter__() and __defineSetter__() isn't widely used? Are you sure? Any web developer that supports at least IE and Firefox probably use these two methods to extend Gecko-based browsers.

Hallvord R. M. Steenhallvors Thursday, April 20, 2006 8:54:31 AM

We only support non-standard stuff when we have to and we haven't seen many sites requiring this. I still don't see that many but of course some of them are major like Live.com ..

Write a comment

You must be logged in to write a comment. If you're not a registered member, please sign up.