在 jQuery 就绪事件逻辑中:
// Catch cases where $(document).ready() is called after the
// browser event has already occurred.
if ( document.readyState === "complete" ) {
// Handle it asynchronously to allow scripts the opportunity to delay ready
return setTimeout( jQuery.ready, 1 );
}
您能否解释一下评论:“异步处理它以允许脚本有机会延迟准备好”。
我不明白什么脚本以及为什么要延迟准备好?