MCPcopy
hub / github.com/angular-ui/ui-grid / jqLiteReady

Function jqLiteReady

lib/test/angular/1.8.0/angular.js:3583–3602  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

3581}
3582
3583function jqLiteReady(fn) {
3584 function trigger() {
3585 window.document.removeEventListener('DOMContentLoaded', trigger);
3586 window.removeEventListener('load', trigger);
3587 fn();
3588 }
3589
3590 // check if document is already loaded
3591 if (window.document.readyState === 'complete') {
3592 window.setTimeout(fn);
3593 } else {
3594 // We can not use jqLite since we are not done loading and jQuery could be loaded later.
3595
3596 // Works for modern browsers and IE9
3597 window.document.addEventListener('DOMContentLoaded', trigger);
3598
3599 // Fallback to window.onload for others
3600 window.addEventListener('load', trigger);
3601 }
3602}
3603
3604//////////////////////////////////////////
3605// Functions which are declared directly.

Callers 1

JQLiteFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected