JavaScript browser runtime
JavaScript event loop, window object, browser runtime, and animation
Learn the JavaScript browser runtime with lessons on the window object, window sizes and scrolling, event loop, microtasks, macrotasks, popups, postMessage, clickjacking, and JavaScript animations.
Browser runtime and event loop lessons
Browser environment and window object
Understand the browser runtime, global window object, DOM entry points, BOM APIs, and JavaScript execution context.
Outcome: Recognize how JavaScript code runs inside the browser environment.
- JavaScript window object
- browser JavaScript
- browser runtime
Window sizes and scrolling
Read viewport dimensions, scroll positions, and use scrollTo, scrollBy, and scrollIntoView.
Outcome: Handle viewport and scroll behavior with browser APIs.
- window size JavaScript
- JavaScript scroll
- scrollIntoView
Event loop, microtasks, and macrotasks
Study the event loop, task queues, microtasks, macrotasks, rendering timing, and asynchronous browser execution.
Outcome: Predict async execution order across promises, timers, rendering, and browser events.
- JavaScript event loop
- microtasks JavaScript
- macrotasks JavaScript
Popups and window methods
Use window.open, popup references, opener relationships, popup blocking rules, and browser window controls.
Outcome: Understand when popup windows work and how they communicate with opener pages.
- window.open JavaScript
- JavaScript popup
- popup window JavaScript
Cross-window communication
Work with iframes, same-origin policy, window.frames, window.parent, sandbox, and postMessage.
Outcome: Communicate between frames and windows without violating browser origin rules.
- postMessage JavaScript
- iframe JavaScript
- cross window communication
Clickjacking protection
Learn how clickjacking works, why frames can be dangerous, and how frame protection reduces UI attacks.
Outcome: Recognize browser frame security risks that affect JavaScript applications.
- clickjacking JavaScript
- iframe security
- browser security JavaScript
JavaScript animations
Build JavaScript animations with timing functions, requestAnimationFrame, progress values, and rendering loops.
Outcome: Create animation loops that cooperate with browser rendering.
- JavaScript animations
- requestAnimationFrame
- animation JavaScript