(element)
| 2471 | |
| 2472 | ///////////////////////////////////////////// |
| 2473 | function JQLite(element) { |
| 2474 | if (element instanceof JQLite) { |
| 2475 | return element; |
| 2476 | } |
| 2477 | |
| 2478 | var argIsString; |
| 2479 | |
| 2480 | if (isString(element)) { |
| 2481 | element = trim(element); |
| 2482 | argIsString = true; |
| 2483 | } |
| 2484 | if (!(this instanceof JQLite)) { |
| 2485 | if (argIsString && element.charAt(0) != '<') { |
| 2486 | throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element'); |
| 2487 | } |
| 2488 | return new JQLite(element); |
| 2489 | } |
| 2490 | |
| 2491 | if (argIsString) { |
| 2492 | jqLiteAddNodes(this, jqLiteParseHTML(element)); |
| 2493 | } else { |
| 2494 | jqLiteAddNodes(this, element); |
| 2495 | } |
| 2496 | } |
| 2497 | |
| 2498 | function jqLiteClone(element) { |
| 2499 | return element.cloneNode(true); |
no test coverage detected