之前,DOM 基本就绪,立刻上报即可(sendBeacon 不会拖慢渲染) if(document.readyState === 'loading') document.addEventListener('DOMContentLoaded', send); else send(); })();