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

Function jqLiteInheritedData

lib/test/angular/1.5.0/angular.js:3051–3069  ·  view source on GitHub ↗
(element, name, value)

Source from the content-addressed store, hash-verified

3049}
3050
3051function jqLiteInheritedData(element, name, value) {
3052 // if element is the document object work with the html element instead
3053 // this makes $(document).scope() possible
3054 if (element.nodeType == NODE_TYPE_DOCUMENT) {
3055 element = element.documentElement;
3056 }
3057 var names = isArray(name) ? name : [name];
3058
3059 while (element) {
3060 for (var i = 0, ii = names.length; i < ii; i++) {
3061 if (isDefined(value = jqLite.data(element, names[i]))) return value;
3062 }
3063
3064 // If dealing with a document fragment node with a host element, and no parent, use the host
3065 // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM
3066 // to lookup parent controllers.
3067 element = element.parentNode || (element.nodeType === NODE_TYPE_DOCUMENT_FRAGMENT && element.host);
3068 }
3069}
3070
3071function jqLiteEmpty(element) {
3072 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