MCPcopy
hub / github.com/angular-ui/ui-grid / jqLiteInheritedData

Function jqLiteInheritedData

lib/test/angular/1.8.0/angular.js:3536–3554  ·  view source on GitHub ↗
(element, name, value)

Source from the content-addressed store, hash-verified

3534}
3535
3536function jqLiteInheritedData(element, name, value) {
3537 // if element is the document object work with the html element instead
3538 // this makes $(document).scope() possible
3539 if (element.nodeType === NODE_TYPE_DOCUMENT) {
3540 element = element.documentElement;
3541 }
3542 var names = isArray(name) ? name : [name];
3543
3544 while (element) {
3545 for (var i = 0, ii = names.length; i < ii; i++) {
3546 if (isDefined(value = jqLite.data(element, names[i]))) return value;
3547 }
3548
3549 // If dealing with a document fragment node with a host element, and no parent, use the host
3550 // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM
3551 // to lookup parent controllers.
3552 element = element.parentNode || (element.nodeType === NODE_TYPE_DOCUMENT_FRAGMENT && element.host);
3553 }
3554}
3555
3556function jqLiteEmpty(element) {
3557 jqLiteDealoc(element, true);

Callers 2

jqLiteControllerFunction · 0.70
angular.jsFile · 0.70

Calls 2

isArrayFunction · 0.70
isDefinedFunction · 0.70

Tested by

no test coverage detected