MCPcopy Create free account
hub / github.com/apache/cloudstack / JQLite

Function JQLite

tools/ngui/static/js/lib/angular.js:1579–1601  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

1577
1578/////////////////////////////////////////////
1579function 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>&#160;</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
1603function JQLiteClone(element) {
1604 return element.cloneNode(true);

Callers 1

angular.jsFile · 0.85

Calls 5

isStringFunction · 0.85
JQLiteAddNodesFunction · 0.85
removeChildMethod · 0.80
removeMethod · 0.65
ErrorFunction · 0.50

Tested by

no test coverage detected