diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/wwwroot/libs/abp/js/abp.js b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/wwwroot/libs/abp/js/abp.js index b8e8d358e3..c086b0460b 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/wwwroot/libs/abp/js/abp.js +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/wwwroot/libs/abp/js/abp.js @@ -2,6 +2,16 @@ (function () { abp.utils = abp.utils || {}; + // DOM READY ///////////////////////////////////////////////////// + + abp.domReady = function (fn) { + if (document.readyState === "complete" || document.readyState === "interactive") { + setTimeout(fn, 1); + } else { + document.addEventListener("DOMContentLoaded", fn); + } + }; + // COOKIES /////////////////////////////////////////////////////// /**