feat: ✨ add `unload` to loading indicator
Signed-off-by: WaitSpring <me@waitspring.com>
这个提交包含在:
父节点
63b7c830e9
当前提交
aca7d7551e
|
@ -128,6 +128,11 @@ function main( window ) {
|
|||
// Set up loading indicator
|
||||
document.documentElement.classList.add( 'citizen-loading' );
|
||||
}, false );
|
||||
|
||||
window.addEventListener( 'unload', function () {
|
||||
// unset loading indicator
|
||||
document.documentElement.classList.remove( 'citizen-loading' );
|
||||
}, false );
|
||||
}
|
||||
|
||||
if ( document.readyState === 'interactive' || document.readyState === 'complete' ) {
|
||||
|
|
正在加载...
在新工单中引用