(element, name, value)
| 2937 | } |
| 2938 | |
| 2939 | function 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 | |
| 2959 | function jqLiteEmpty(element) { |
| 2960 | jqLiteDealoc(element, true); |
no test coverage detected