Changeset 37759 for websites

Show
Ignore:
Timestamp:
05/30/10 15:10:06 (4 years ago)
Author:
NeoCat
Message:

avoid DOM_Exception 22 while writing to localStorage on iPad

Location:
websites/twicli
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • websites/twicli/oauth/twicli_oauth.js

    r37437 r37759  
    2222function writeCookie(key, val) { 
    2323        if (use_local_storage && window.localStorage) 
    24                 try { window.localStorage["twicli_"+key] = val; } catch(e) { alert("DOM storage write error!\n" + e); } 
     24                try { 
     25                        deleteCookie(key); // to avoid exception on iPad 
     26                        window.localStorage["twicli_"+key] = val; 
     27                } catch(e) { 
     28                        alert("DOM storage write error!\n" + e); 
     29                } 
    2530        else { 
    2631                var sday = new Date(); 
  • websites/twicli/twicli.js

    r37721 r37759  
    181181function writeCookie(key, val, days) { 
    182182        if (use_local_storage && window.localStorage) 
    183                 try { window.localStorage["twicli_"+key] = val; } catch(e) { alert("DOM storage write error!\n" + e); } 
     183                try { 
     184                        deleteCookie(key); // to avoid exception on iPad 
     185                        window.localStorage["twicli_"+key] = val; 
     186                } catch(e) { 
     187                        alert("DOM storage write error!\n" + e); 
     188                } 
    184189        else { 
    185190                var sday = new Date();