src/aria/storage/HTML5Storage.js
function () {
            if (!this.storage) {
                return;
            }
            var listeners = !!this._listeners;
            var registeredBrowserEvent = !!this._browserEventCb;

            if (listeners !== registeredBrowserEvent) {
                if (listeners) {
                    this._browserEventCb = {
                        fn : this._browserEvent,
                        scope : this
                    };
                    // listen to events raised by instances in a different window but the same storage location
                    ariaUtilsEvent.addListener(Aria.$window, "storage", this._browserEventCb);
                } else {
                    ariaUtilsEvent.removeListener(Aria.$window, "storage", this._browserEventCb);
                    this._browserEventCb = null;
                }
            }

        }
function () {
            if (!this.storage) {
                return;
            }
            var listeners = !!this._listeners;
            var registeredBrowserEvent = !!this._browserEventCb;

            if (listeners !== registeredBrowserEvent) {
                if (listeners) {
                    this._browserEventCb = {
                        fn : this._browserEvent,
                        scope : this
                    };
                    // listen to events raised by instances in a different window but the same storage location
                    ariaUtilsEvent.addListener(Aria.$window, "storage", this._browserEventCb);
                } else {
                    ariaUtilsEvent.removeListener(Aria.$window, "storage", this._browserEventCb);
                    this._browserEventCb = null;
                }
            }

        }
function ( ) { if ( ! this . storage ) { return ; } var listeners = ! ! this . _listeners ; var registeredBrowserEvent = ! ! this . _browserEventCb ; if ( listeners !== registeredBrowserEvent ) { if ( listeners ) { this . _browserEventCb = { fn : this . _browserEvent , scope : this } ; // listen to events raised by instances in a different window but the same storage location ariaUtilsEvent . addListener ( Aria . $window , "storage" , this . _browserEventCb ) ; } else { ariaUtilsEvent . removeListener ( Aria . $window , "storage" , this . _browserEventCb ) ; this . _browserEventCb = null ; } } }
Depending on whether there is any listener, registers or unregisters the browser storage event.
Depending on whether there is any listener registers or unregisters the browser storage event .