MCPcopy Index your code
hub / github.com/angular-ui/ui-grid / cacheState

Function cacheState

lib/test/angular/1.4.3/angular.js:5548–5558  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5546 // This variable should be used *only* inside the cacheState function.
5547 var lastCachedState = null;
5548 function cacheState() {
5549 // This should be the only place in $browser where `history.state` is read.
5550 cachedState = getCurrentState();
5551 cachedState = isUndefined(cachedState) ? null : cachedState;
5552
5553 // Prevent callbacks fo fire twice if both hashchange & popstate were fired.
5554 if (equals(cachedState, lastCachedState)) {
5555 cachedState = lastCachedState;
5556 }
5557 lastCachedState = cachedState;
5558 }
5559
5560 function fireUrlChange() {
5561 if (lastBrowserUrl === self.url() && lastHistoryState === cachedState) {

Callers 2

BrowserFunction · 0.70

Calls 3

getCurrentStateFunction · 0.70
isUndefinedFunction · 0.70
equalsFunction · 0.70

Tested by

no test coverage detected