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

Re: Web Storage how to check for support?

From: João Eiras <joaoe@opera.com>
Date: Sat, 01 Aug 2009 15:11:40 +0100
To: ~:'' ありがとうございました <j.chetwynd@btinternet.com>, public-webapps@w3.org
Message-ID: <op.uxzlpq1g2q99of@coruscant>
> How can one in a script check for UA support?
> else if(localStorage){}
> does not work for Opera**.

This obviously does not work because you need to prefix localStorage with window "if(window.localStorage)" else the script breaks because localStorage is a undefined identifier while window.localStorage looks up a property in the window. Different things, specific to ecmascript itself.
Received on Saturday, 1 August 2009 14:12:25 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:18 UTC