(element)
| 1577 | |
| 1578 | ///////////////////////////////////////////// |
| 1579 | function JQLite(element) { |
| 1580 | if (element instanceof JQLite) { |
| 1581 | return element; |
| 1582 | } |
| 1583 | if (!(this instanceof JQLite)) { |
| 1584 | if (isString(element) && element.charAt(0) != '<') { |
| 1585 | throw Error('selectors not implemented'); |
| 1586 | } |
| 1587 | return new JQLite(element); |
| 1588 | } |
| 1589 | |
| 1590 | if (isString(element)) { |
| 1591 | var div = document.createElement('div'); |
| 1592 | // Read about the NoScope elements here: |
| 1593 | // http://msdn.microsoft.com/en-us/library/ms533897(VS.85).aspx |
| 1594 | div.innerHTML = '<div> </div>' + element; // IE insanity to make NoScope elements work! |
| 1595 | div.removeChild(div.firstChild); // remove the superfluous div |
| 1596 | JQLiteAddNodes(this, div.childNodes); |
| 1597 | this.remove(); // detach the elements from the temporary DOM div. |
| 1598 | } else { |
| 1599 | JQLiteAddNodes(this, element); |
| 1600 | } |
| 1601 | } |
| 1602 | |
| 1603 | function JQLiteClone(element) { |
| 1604 | return element.cloneNode(true); |
no test coverage detected