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

Function cacheState

lib/test/angular/1.7.0/angular.js:6634–6646  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6632 // This variable should be used *only* inside the cacheState function.
6633 var lastCachedState = null;
6634 function cacheState() {
6635 // This should be the only place in $browser where `history.state` is read.
6636 cachedState = getCurrentState();
6637 cachedState = isUndefined(cachedState) ? null : cachedState;
6638
6639 // Prevent callbacks fo fire twice if both hashchange & popstate were fired.
6640 if (equals(cachedState, lastCachedState)) {
6641 cachedState = lastCachedState;
6642 }
6643
6644 lastCachedState = cachedState;
6645 lastHistoryState = cachedState;
6646 }
6647
6648 function fireStateOrUrlChange() {
6649 var prevLastHistoryState = lastHistoryState;

Callers 2

BrowserFunction · 0.70
fireStateOrUrlChangeFunction · 0.70

Calls 3

isUndefinedFunction · 0.70
equalsFunction · 0.70
getCurrentStateFunction · 0.50

Tested by

no test coverage detected