(element, name, value)
| 2714 | } |
| 2715 | |
| 2716 | function jqLiteInheritedData(element, name, value) { |
| 2717 | // if element is the document object work with the html element instead |
| 2718 | // this makes $(document).scope() possible |
| 2719 | if (element.nodeType == NODE_TYPE_DOCUMENT) { |
| 2720 | element = element.documentElement; |
| 2721 | } |
| 2722 | var names = isArray(name) ? name : [name]; |
| 2723 | |
| 2724 | while (element) { |
| 2725 | for (var i = 0, ii = names.length; i < ii; i++) { |
| 2726 | if ((value = jqLite.data(element, names[i])) !== undefined) return value; |
| 2727 | } |
| 2728 | |
| 2729 | // If dealing with a document fragment node with a host element, and no parent, use the host |
| 2730 | // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM |
| 2731 | // to lookup parent controllers. |
| 2732 | element = element.parentNode || (element.nodeType === NODE_TYPE_DOCUMENT_FRAGMENT && element.host); |
| 2733 | } |
| 2734 | } |
| 2735 | |
| 2736 | function jqLiteEmpty(element) { |
| 2737 | jqLiteDealoc(element, true); |
no test coverage detected