OffscreenCanvas API

Compare main thread rendering vs worker thread rendering using OffscreenCanvas.

Canvas A (Main Thread)

Canvas B (Worker Thread)

When the main thread is blocked, all UI elements are frozen. The hover effect on buttons is also blocked. Try hovering over the button below while Canvas A is blocked:

When the worker thread is blocked, the main thread remains free. UI elements, animations, and hover effects stay responsive, even though Canvas B stops updating.