W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2012

Re: [IndexedDB] Problems unprefixing IndexedDB

From: Glenn Maynard <glenn@zewt.org>
Date: Wed, 8 Aug 2012 21:16:35 -0500
Message-ID: <CABirCh9nmxSooN3g3mnUDvFov=1ZQkctR1kd-GVNiexDuHSC8w@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: public-webapps@w3.org
On Wed, Aug 8, 2012 at 7:23 PM, Adam Barth <w3c@adambarth.com> wrote:

> > window.indexedDB = window.indexedDB || window.webkitIndexedDB ||
> > window.mozIndexedDB || window.msIndexedDB || ...
> >
> > This avoids the var hoisting that's causing the problems.
>
> If we're telling people to use that pattern, we might as well just not
> prefix the API in the first place because that pattern just tells the
> web developers to unilaterally unprefix the API themselves.
>

If browsers are going to unprefix APIs without leaving the prefixed API in
place for a while, then this is what people are going to do anyway.
Otherwise, their sites will break (or lose functionality) until they
scramble to add the unprefixed name.

APIs should always be shipped prefixed and unprefixed for a reasonable
period, so people have an opportunity to add the unprefixed name to their
site before the unprefixed name goes away.

On Wed, Aug 8, 2012 at 7:28 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> Yep.  The only benefit of the prefixing at that point is to maybe mark the
> API as experimental, if any web developers pay attention.  Which I doubt.
>

At the very least, *vendor* prefixing seems pointless; a single prefix for
experimental, non-vendor-specific APIs would convey the same thing, without
having to special case every browser.  (People might need to work around
implementation differences, but we do that just fine without vendor
prefixes.)

-- 
Glenn Maynard
Received on Thursday, 9 August 2012 02:17:04 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:54 GMT