W3C home > Mailing lists > Public > public-webapi@w3.org > April 2006

Re: [comment] XMLHttpRequest Object - Address Extensibility

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sat, 22 Apr 2006 11:04:59 +0200
To: "Brad Fults" <bfults@gmail.com>
Cc: "Web APIs WG (public)" <public-webapi@w3.org>
Message-ID: <l3sj42ll3r9vv5teurqls0pp7ik7a66bih@hive.bjoern.hoehrmann.de>

* Brad Fults wrote:
>> This is very silly, the VendorMember scheme is entirely stupid, it's
>> completely useless for authors, we can't do anything with it, and is much
>> worse than simple invented terms that eventually get standardised.
>
>Completely agreed. This is how we get ridiculous code like:
>
>if (obj.MozFoo)
>  obj.MozFoo = 0.7;
>else if (obj.WebkitFoo)
>  obj.WebkitFoo = 0.7;
>else if (window.opera) // because Opera creates stubs for obj.*Foo
>just to drive us insane
>  obj.OperaFoo = 0.7
>else
>{
>  try { obj.Foo = 70; } // ugh IE
>  catch (e) { alert("No idea what's going on!"); }
>}

Of course, allowing vendors to use member names as they please does not
prevent this is in way, and not doing the above is what us gives names
like .weWouldHaveLikedFooButEveryBrowserDoesTheirOwnSillyThingWithFoo().
Poorly written code fragments such as the one above don't bring this
discussion forward much.

>Agreed. Also, I think the "what if someone uses a good property name
>for a lame implementation" isn't as much of a concern because we're
>talking about major browser vendors, not any random paster.

Oh my...
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Saturday, 22 April 2006 09:05:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:54 GMT