(element)
| 2845 | |
| 2846 | ///////////////////////////////////////////// |
| 2847 | function JQLite(element) { |
| 2848 | if (element instanceof JQLite) { |
| 2849 | return element; |
| 2850 | } |
| 2851 | |
| 2852 | var argIsString; |
| 2853 | |
| 2854 | if (isString(element)) { |
| 2855 | element = trim(element); |
| 2856 | argIsString = true; |
| 2857 | } |
| 2858 | if (!(this instanceof JQLite)) { |
| 2859 | if (argIsString && element.charAt(0) != '<') { |
| 2860 | throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element'); |
| 2861 | } |
| 2862 | return new JQLite(element); |
| 2863 | } |
| 2864 | |
| 2865 | if (argIsString) { |
| 2866 | jqLiteAddNodes(this, jqLiteParseHTML(element)); |
| 2867 | } else { |
| 2868 | jqLiteAddNodes(this, element); |
| 2869 | } |
| 2870 | } |
| 2871 | |
| 2872 | function jqLiteClone(element) { |
| 2873 | return element.cloneNode(true); |
no test coverage detected