(element, name, value)
| 3198 | } |
| 3199 | |
| 3200 | function jqLiteInheritedData(element, name, value) { |
| 3201 | // if element is the document object work with the html element instead |
| 3202 | // this makes $(document).scope() possible |
| 3203 | if (element.nodeType === NODE_TYPE_DOCUMENT) { |
| 3204 | element = element.documentElement; |
| 3205 | } |
| 3206 | var names = isArray(name) ? name : [name]; |
| 3207 | |
| 3208 | while (element) { |
| 3209 | for (var i = 0, ii = names.length; i < ii; i++) { |
| 3210 | if (isDefined(value = jqLite.data(element, names[i]))) return value; |
| 3211 | } |
| 3212 | |
| 3213 | // If dealing with a document fragment node with a host element, and no parent, use the host |
| 3214 | // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM |
| 3215 | // to lookup parent controllers. |
| 3216 | element = element.parentNode || (element.nodeType === NODE_TYPE_DOCUMENT_FRAGMENT && element.host); |
| 3217 | } |
| 3218 | } |
| 3219 | |
| 3220 | function jqLiteEmpty(element) { |
| 3221 | jqLiteDealoc(element, true); |
no test coverage detected