(element, name, value)
| 3049 | } |
| 3050 | |
| 3051 | function 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 | |
| 3071 | function jqLiteEmpty(element) { |
| 3072 | jqLiteDealoc(element, true); |
no test coverage detected