(element)
| 2767 | |
| 2768 | ///////////////////////////////////////////// |
| 2769 | function JQLite(element) { |
| 2770 | if (element instanceof JQLite) { |
| 2771 | return element; |
| 2772 | } |
| 2773 | |
| 2774 | var argIsString; |
| 2775 | |
| 2776 | if (isString(element)) { |
| 2777 | element = trim(element); |
| 2778 | argIsString = true; |
| 2779 | } |
| 2780 | if (!(this instanceof JQLite)) { |
| 2781 | if (argIsString && element.charAt(0) != '<') { |
| 2782 | throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element'); |
| 2783 | } |
| 2784 | return new JQLite(element); |
| 2785 | } |
| 2786 | |
| 2787 | if (argIsString) { |
| 2788 | jqLiteAddNodes(this, jqLiteParseHTML(element)); |
| 2789 | } else { |
| 2790 | jqLiteAddNodes(this, element); |
| 2791 | } |
| 2792 | } |
| 2793 | |
| 2794 | function jqLiteClone(element) { |
| 2795 | return element.cloneNode(true); |
no test coverage detected