MCPcopy
hub / github.com/angular-ui/ui-router / removeIfEmptyData

Function removeIfEmptyData

test/angular/1.7/angular.js:3287–3298  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

3285}
3286
3287function removeIfEmptyData(element) {
3288 var expandoId = element.ng339;
3289 var expandoStore = expandoId && jqCache[expandoId];
3290
3291 var events = expandoStore && expandoStore.events;
3292 var data = expandoStore && expandoStore.data;
3293
3294 if ((!data || isEmptyObject(data)) && (!events || isEmptyObject(events))) {
3295 delete jqCache[expandoId];
3296 element.ng339 = undefined; // don't delete DOM expandos. IE and Chrome don't like it
3297 }
3298}
3299
3300function jqLiteOff(element, type, fn, unsupported) {
3301 if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument');

Callers 2

jqLiteOffFunction · 0.85
jqLiteRemoveDataFunction · 0.85

Calls 1

isEmptyObjectFunction · 0.85

Tested by

no test coverage detected