X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki%2Fmediawiki.storage.js;h=95c77f87044ca324475428eaaa19091245b04ce5;hb=dae4c94d893057345f62a3d498fb85c0a54de5a6;hp=20f8efb659ad8c9c4912fbaf52e4e3cf4a933f0c;hpb=f9e21f91e459c40fed6d8f2e76cccbce07e2ba1b;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki/mediawiki.storage.js b/resources/src/mediawiki/mediawiki.storage.js index 20f8efb659..95c77f8704 100644 --- a/resources/src/mediawiki/mediawiki.storage.js +++ b/resources/src/mediawiki/mediawiki.storage.js @@ -22,10 +22,6 @@ * * @class mw.SafeStorage * @private - */ - - /** - * @ignore * @param {Object|undefined} store The Storage instance to wrap around */ function SafeStorage( store ) { @@ -46,12 +42,12 @@ }; /** - * Set a value in device storage. - * - * @param {string} key Key name to store under - * @param {string} value Value to be stored - * @return {boolean} Whether the save succeeded or not - */ + * Set a value in device storage. + * + * @param {string} key Key name to store under + * @param {string} value Value to be stored + * @return {boolean} Whether the save succeeded or not + */ SafeStorage.prototype.set = function ( key, value ) { try { this.store.setItem( key, value ); @@ -61,11 +57,11 @@ }; /** - * Remove a value from device storage. - * - * @param {string} key Key of item to remove - * @return {boolean} Whether the save succeeded or not - */ + * Remove a value from device storage. + * + * @param {string} key Key of item to remove + * @return {boolean} Whether the save succeeded or not + */ SafeStorage.prototype.remove = function ( key ) { try { this.store.removeItem( key ); @@ -75,6 +71,9 @@ }; /** + * A wrapper for the HTML5 `localStorage` interface + * that is safe to call on all browsers. + * * @class * @singleton * @extends mw.SafeStorage @@ -82,6 +81,9 @@ mw.storage = new SafeStorage( localStorage ); /** + * A wrapper for the HTML5 `sessionStorage` interface + * that is safe to call on all browsers. + * * @class * @singleton * @extends mw.SafeStorage