src/aria/storage/HTML5Storage.js
function (event) {
            // In FF 3.6 this event is raised also inside the same window
            if (aria.storage.EventBus.stop) {
                return;
            }

            var isInteresting = this.namespace
                    ? event.key.substring(0, this.namespace.length) === this.namespace
                    : true;

            if (isInteresting) {
                var oldValue = event.oldValue, newValue = event.newValue;
                if (oldValue) {
                    try {
                        oldValue = this.serializer.parse(oldValue);
                    } catch (e) {}
                }
                if (newValue) {
                    try {
                        newValue = this.serializer.parse(newValue);
                    } catch (e) {}
                }
                this._onStorageEvent({
                    name : "change",
                    key : event.key,
                    oldValue : oldValue,
                    newValue : newValue,
                    url : event.url,
                    namespace : this.namespace
                });
            }
        }
function (event) {
            // In FF 3.6 this event is raised also inside the same window
            if (aria.storage.EventBus.stop) {
                return;
            }

            var isInteresting = this.namespace
                    ? event.key.substring(0, this.namespace.length) === this.namespace
                    : true;

            if (isInteresting) {
                var oldValue = event.oldValue, newValue = event.newValue;
                if (oldValue) {
                    try {
                        oldValue = this.serializer.parse(oldValue);
                    } catch (e) {}
                }
                if (newValue) {
                    try {
                        newValue = this.serializer.parse(newValue);
                    } catch (e) {}
                }
                this._onStorageEvent({
                    name : "change",
                    key : event.key,
                    oldValue : oldValue,
                    newValue : newValue,
                    url : event.url,
                    namespace : this.namespace
                });
            }
        }
function ( event ) { // In FF 3.6 this event is raised also inside the same window if ( aria . storage . EventBus . stop ) { return ; } var isInteresting = this . namespace ? event . key . substring ( 0 , this . namespace . length ) === this . namespace : true ; if ( isInteresting ) { var oldValue = event . oldValue , newValue = event . newValue ; if ( oldValue ) { try { oldValue = this . serializer . parse ( oldValue ) ; } catch ( e ) { } } if ( newValue ) { try { newValue = this . serializer . parse ( newValue ) ; } catch ( e ) { } } this . _onStorageEvent ( { name : "change" , key : event . key , oldValue : oldValue , newValue : newValue , url : event . url , namespace : this . namespace } ) ; } }
React to storage event raised by the browser. We react only if this class does not have a namespace or if the
key appears to be correctly namespaced.
@param {HTMLEvent} event Event raised by the browser
React to storage event raised by the browser . We react only if this class does not have a namespace or if the key appears to be correctly namespaced .