(element, name, value)
| 3036 | } |
| 3037 | |
| 3038 | function jqLiteInheritedData(element, name, value) { |
| 3039 | // if element is the document object work with the html element instead |
| 3040 | // this makes $(document).scope() possible |
| 3041 | if (element.nodeType == NODE_TYPE_DOCUMENT) { |
| 3042 | element = element.documentElement; |
| 3043 | } |
| 3044 | var names = isArray(name) ? name : [name]; |
| 3045 | |
| 3046 | while (element) { |
| 3047 | for (var i = 0, ii = names.length; i < ii; i++) { |
| 3048 | if (isDefined(value = jqLite.data(element, names[i]))) return value; |
| 3049 | } |
| 3050 | |
| 3051 | // If dealing with a document fragment node with a host element, and no parent, use the host |
| 3052 | // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM |
| 3053 | // to lookup parent controllers. |
| 3054 | element = element.parentNode || (element.nodeType === NODE_TYPE_DOCUMENT_FRAGMENT && element.host); |
| 3055 | } |
| 3056 | } |
| 3057 | |
| 3058 | function jqLiteEmpty(element) { |
| 3059 | jqLiteDealoc(element, true); |
no test coverage detected