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

Function JQLite

test/angular/1.6/angular.js:3234–3259  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

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