MCPcopy Create free account
hub / github.com/binux/qiandao / JQLite

Function JQLite

web/static/components/angularjs/angular.js:2356–2377  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

2354
2355/////////////////////////////////////////////
2356function JQLite(element) {
2357 if (element instanceof JQLite) {
2358 return element;
2359 }
2360 if (isString(element)) {
2361 element = trim(element);
2362 }
2363 if (!(this instanceof JQLite)) {
2364 if (isString(element) && element.charAt(0) != '<') {
2365 throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element');
2366 }
2367 return new JQLite(element);
2368 }
2369
2370 if (isString(element)) {
2371 jqLiteAddNodes(this, jqLiteParseHTML(element));
2372 var fragment = jqLite(document.createDocumentFragment());
2373 fragment.append(this);
2374 } else {
2375 jqLiteAddNodes(this, element);
2376 }
2377}
2378
2379function jqLiteClone(element) {
2380 return element.cloneNode(true);

Callers 1

angular.jsFile · 0.85

Calls 3

jqLiteAddNodesFunction · 0.85
jqLiteParseHTMLFunction · 0.85
isStringFunction · 0.70

Tested by

no test coverage detected