in Ox.localStorage, use native for in loop to test if the browser can iterate over localStorage

This commit is contained in:
rolux 2013-02-18 12:44:40 +05:30
commit 5ca1c5b36c

View file

@ -96,7 +96,7 @@ Ox.localStorage = function(namespace) {
// this will fail if third party cookies/storage is not allowed // this will fail if third party cookies/storage is not allowed
localStorage = window.localStorage || {}; localStorage = window.localStorage || {};
// FF 3.6 can't assign to or iterate over localStorage // FF 3.6 can't assign to or iterate over localStorage
Ox.forEach(localStorage, function(value, key) {}); for (var key in localStorage) {};
} catch (e) { } catch (e) {
localStorage = {}; localStorage = {};
} }