MCPcopy Create free account
hub / github.com/angular-ui/ui-grid / jqLiteInheritedData

Function jqLiteInheritedData

lib/test/angular/1.6.7/angular.js:3431–3449  ·  view source on GitHub ↗
(element, name, value)

Source from the content-addressed store, hash-verified

3429}
3430
3431function jqLiteInheritedData(element, name, value) {
3432 // if element is the document object work with the html element instead
3433 // this makes $(document).scope() possible
3434 if (element.nodeType === NODE_TYPE_DOCUMENT) {
3435 element = element.documentElement;
3436 }
3437 var names = isArray(name) ? name : [name];
3438
3439 while (element) {
3440 for (var i = 0, ii = names.length; i < ii; i++) {
3441 if (isDefined(value = jqLite.data(element, names[i]))) return value;
3442 }
3443
3444 // If dealing with a document fragment node with a host element, and no parent, use the host
3445 // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM
3446 // to lookup parent controllers.
3447 element = element.parentNode || (element.nodeType === NODE_TYPE_DOCUMENT_FRAGMENT && element.host);
3448 }
3449}
3450
3451function jqLiteEmpty(element) {
3452 jqLiteDealoc(element, true);

Callers 2

jqLiteControllerFunction · 0.70
angular.jsFile · 0.70

Calls 2

isDefinedFunction · 0.70
isArrayFunction · 0.50

Tested by

no test coverage detected