MCPcopy Index your code
hub / github.com/angular-ui/ui-grid / jqLiteReady

Function jqLiteReady

lib/test/angular/1.7.0/angular.js:3472–3491  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

3470}
3471
3472function jqLiteReady(fn) {
3473 function trigger() {
3474 window.document.removeEventListener('DOMContentLoaded', trigger);
3475 window.removeEventListener('load', trigger);
3476 fn();
3477 }
3478
3479 // check if document is already loaded
3480 if (window.document.readyState === 'complete') {
3481 window.setTimeout(fn);
3482 } else {
3483 // We can not use jqLite since we are not done loading and jQuery could be loaded later.
3484
3485 // Works for modern browsers and IE9
3486 window.document.addEventListener('DOMContentLoaded', trigger);
3487
3488 // Fallback to window.onload for others
3489 window.addEventListener('load', trigger);
3490 }
3491}
3492
3493//////////////////////////////////////////
3494// Functions which are declared directly.

Callers 1

JQLiteFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected