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

(unknown charset) Re: Web Storage how to check for support?

From: (unknown charset) Joseph Pecoraro <joepeck02@gmail.com>
Date: Mon, 27 Jul 2009 11:41:34 -0400
Cc: (unknown charset) public-webapps@w3.org, Doug Schepers <schepers@w3.org>, Charles McCathieNevile <chaals@opera.com>
Message-Id: <7B3163F6-CDA8-4010-9B93-960DA0AE201F@gmail.com>
To: (unknown charset) ~:'' ありがとうございました <j.chetwynd@btinternet.com>
> http://dev.w3.org/html5/webstorage/#the-storage-interface
> Web Storage how to check for support?
>
> How can one in a script check for UA support?

How about either of the following, they both worked as expected for me.

   // Check for the Storage interface
   if (window.Storage) { ... }

   // Check for an instance of the interface
   if (window.localStorage) { ... }

- Joe
Received on Monday, 27 July 2009 15:42:20 GMT

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