MCPcopy Create free account
hub / github.com/EricSimons/ionic-course / jqLiteInheritedData

Function jqLiteInheritedData

code/songhop/www/lib/angular/angular.js:2671–2689  ·  view source on GitHub ↗
(element, name, value)

Source from the content-addressed store, hash-verified

2669}
2670
2671function jqLiteInheritedData(element, name, value) {
2672 // if element is the document object work with the html element instead
2673 // this makes $(document).scope() possible
2674 if (element.nodeType == NODE_TYPE_DOCUMENT) {
2675 element = element.documentElement;
2676 }
2677 var names = isArray(name) ? name : [name];
2678
2679 while (element) {
2680 for (var i = 0, ii = names.length; i < ii; i++) {
2681 if ((value = jqLite.data(element, names[i])) !== undefined) return value;
2682 }
2683
2684 // If dealing with a document fragment node with a host element, and no parent, use the host
2685 // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM
2686 // to lookup parent controllers.
2687 element = element.parentNode || (element.nodeType === NODE_TYPE_DOCUMENT_FRAGMENT && element.host);
2688 }
2689}
2690
2691function jqLiteEmpty(element) {
2692 jqLiteDealoc(element, true);

Callers 2

jqLiteControllerFunction · 0.70
angular.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected