Rendering from a worker

A visual isolate's frame: records out, events and host calls back

Rendering from a worker A visual isolate's frame: records out, events and host calls back Isolate UI code · React · Preact · plain DOM · Isolate's worker Isolate UI code React · Preact · plain DOM isoloop-dom subset · the worker's document · Isolate's worker isoloop-dom subset the worker's document Recorder · one batch per microtask · Isolate's worker Recorder one batch per microtask Compositor · 8 ms a frame, round-robin · Main thread Compositor 8 ms a frame, round-robin Applier + registry · sanitises tags, attributes · Main thread Applier + registry sanitises tags, attributes Surface shadow root · <iso-surface> · adopted CSS · Main thread Surface shadow root <iso-surface> · adopted CSS ctx.host · flushes, then calls · Isolate's worker ctx.host flushes, then calls Host calls · run in the frame · Main thread Host calls run in the frame Event dispatch · capture and bubble · Isolate's worker Event dispatch capture and bubble EventBridge · delegated listeners · Main thread EventBridge delegated listeners Router · onNavigate decides · Main thread Router onNavigate decides DOM calls records patch apply writes flush call after queued batches result · OffscreenCanvas user input event: target, listeners on its path dispatch link clicks Isolate's worker Main thread Legend The page's DOM Isolate side (worker) Kernel (main thread)