EN: Check whether the page is loaded successfully (Keep the compatibility if the browser's load event has been triggered).
load
ZH: 页面加载完成。
Usage:
windowLoaded() .then(res => { console.log(`Load Success: ${res}`); }) .catch(err => { console.log(`Load Timeout or Fail: ${err.message}`); }); Copy
windowLoaded() .then(res => { console.log(`Load Success: ${res}`); }) .catch(err => { console.log(`Load Timeout or Fail: ${err.message}`); });
Output:
Load Success: load Copy
Load Success: load
超时时间 / 单位:秒
document is loaded? 'complete' 'load' / 'timeout'
EN: Check whether the page is loaded successfully (Keep the compatibility if the browser's
load
event has been triggered).ZH: 页面加载完成。
Usage:
Output: