MCPcopy
hub / github.com/angular-ui/ui-router / JQLite

Function JQLite

test/angular/1.7/angular.js:3239–3264  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

3237
3238/////////////////////////////////////////////
3239function JQLite(element) {
3240 if (element instanceof JQLite) {
3241 return element;
3242 }
3243
3244 var argIsString;
3245
3246 if (isString(element)) {
3247 element = trim(element);
3248 argIsString = true;
3249 }
3250 if (!(this instanceof JQLite)) {
3251 if (argIsString && element.charAt(0) !== '<') {
3252 throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element');
3253 }
3254 return new JQLite(element);
3255 }
3256
3257 if (argIsString) {
3258 jqLiteAddNodes(this, jqLiteParseHTML(element));
3259 } else if (isFunction(element)) {
3260 jqLiteReady(element);
3261 } else {
3262 jqLiteAddNodes(this, element);
3263 }
3264}
3265
3266function jqLiteClone(element) {
3267 return element.cloneNode(true);

Callers

nothing calls this directly

Calls 6

isStringFunction · 0.70
trimFunction · 0.70
jqLiteAddNodesFunction · 0.70
jqLiteParseHTMLFunction · 0.70
isFunctionFunction · 0.70
jqLiteReadyFunction · 0.70

Tested by

no test coverage detected