- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Wed, 08 Aug 2012 20:22:17 -0400
- To: public-webapps@w3.org
On 8/8/12 8:12 PM, Tab Atkins Jr. wrote: > Just for reference, the correct way to do this is: > > window.indexedDB = window.indexedDB || window.webkitIndexedDB || > window.mozIndexedDB || window.msIndexedDB || ... > > This avoids the var hoisting that's causing the problems. As long as you're not in strict-mode code. If you are, you have to be a bit smarter and actually condition things on |if (!("indexedDB" in window))| of course... -Boris
Received on Thursday, 9 August 2012 00:22:46 UTC