ENع
الدرس 13 · How browsers use HTML

Loading scripts: defer and async

لم يُترجم بعد؛ يُعرض باللغة الإنجليزية

A browser reads HTML from top to bottom on one main thread, building the DOM as it goes. A plain <script src> tag stops that reading until the JavaScript file has downloaded and run. Follow one five-line page and one tiny app.js through three page loads: plain, defer and async. Watch the timeline, the DOM tree and the console to see when the script runs, what it can find, and when DOMContentLoaded fires.

12 دقيقة11 خطوات5 أسئلةAdvanced
شكل 13 · تفاعلي
جارٍ تحميل الرسم…
أو ← →

اختبار يتاح بعد الخطوة الأخيرة.