Re: [IndexedDB] Problems unprefixing IndexedDB

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 UTC