Make localStorage work when cookies are disabled.
window.localStorage must be in a try/catch block, because it is inaccessible when browser cookies are disabled. #1 fixed this only for IE, because IE apparently leaves windows.localStorage undefined when cookies are disabled, whereas Chrome and Firefox both throw a SecurityError when trying to access it. (didn't test the change)
Showing
想要评论请 注册 或 登录