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

Function jqLiteInheritedData

lib/test/angular/1.7.0/angular.js:3425–3443  ·  view source on GitHub ↗
(element, name, value)

Source from the content-addressed store, hash-verified

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