(element)
| 2994 | |
| 2995 | ///////////////////////////////////////////// |
| 2996 | function JQLite(element) { |
| 2997 | if (element instanceof JQLite) { |
| 2998 | return element; |
| 2999 | } |
| 3000 | |
| 3001 | var argIsString; |
| 3002 | |
| 3003 | if (isString(element)) { |
| 3004 | element = trim(element); |
| 3005 | argIsString = true; |
| 3006 | } |
| 3007 | if (!(this instanceof JQLite)) { |
| 3008 | if (argIsString && element.charAt(0) !== '<') { |
| 3009 | throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element'); |
| 3010 | } |
| 3011 | return new JQLite(element); |
| 3012 | } |
| 3013 | |
| 3014 | if (argIsString) { |
| 3015 | jqLiteAddNodes(this, jqLiteParseHTML(element)); |
| 3016 | } else { |
| 3017 | jqLiteAddNodes(this, element); |
| 3018 | } |
| 3019 | } |
| 3020 | |
| 3021 | function jqLiteClone(element) { |
| 3022 | return element.cloneNode(true); |
no test coverage detected