angular-webstorage icon indicating copy to clipboard operation
angular-webstorage copied to clipboard

throw access denied exception on IE10/Windows8 when IE10 under Protected Mode.

Open jswxwxf opened this issue 12 years ago • 3 comments

Will throw access denied exception when IE10 under Protected Mode on the code if (!window.localStorage) {

jswxwxf avatar Dec 18 '13 06:12 jswxwxf

One suggest solution is that we can wrap a try catch block around the issue code. :)

try {

if (!window.localStorage) { ...

if (!window.sessionStorage) { ...

} catch (e) {}

jswxwxf avatar Dec 18 '13 07:12 jswxwxf

Thanks for reporting this!

Your suggested fix looks good, the in-module feature tests would still work as expected, and the module would fall back on ram storage if needed.

I'll include the try/catch-block asap, thanks.

fredricrylander avatar Dec 18 '13 08:12 fredricrylander

You're welcome. :) Because I'm using bower to download your angular webstorage, so I'm hoping that you can fix it here and I don't need maintain my modified version.

jswxwxf avatar Dec 18 '13 09:12 jswxwxf