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

Function jqLiteInheritedData

lib/test/angular/1.4.3/angular.js:2939–2957  ·  view source on GitHub ↗
(element, name, value)

Source from the content-addressed store, hash-verified

2937}
2938
2939function jqLiteInheritedData(element, name, value) {
2940 // if element is the document object work with the html element instead
2941 // this makes $(document).scope() possible
2942 if (element.nodeType == NODE_TYPE_DOCUMENT) {
2943 element = element.documentElement;
2944 }
2945 var names = isArray(name) ? name : [name];
2946
2947 while (element) {
2948 for (var i = 0, ii = names.length; i < ii; i++) {
2949 if ((value = jqLite.data(element, names[i])) !== undefined) return value;
2950 }
2951
2952 // If dealing with a document fragment node with a host element, and no parent, use the host
2953 // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM
2954 // to lookup parent controllers.
2955 element = element.parentNode || (element.nodeType === NODE_TYPE_DOCUMENT_FRAGMENT && element.host);
2956 }
2957}
2958
2959function jqLiteEmpty(element) {
2960 jqLiteDealoc(element, true);

Callers 2

jqLiteControllerFunction · 0.70
angular.jsFile · 0.70

Calls 1

isArrayFunction · 0.50

Tested by

no test coverage detected