You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Works on HTML and SVG. Returns a handle. With a `msg`, a `{msg, animation_handle, ok}` payload fires via `receive()` on finish. Handle auto-disposes on finish or cancel; for `iterations: "Infinity"` call `animation_dispose(h)` when done.
@@ -199,7 +197,7 @@ Payload: `{msg, where, error, stack?}`. `where` identifies the call site (`event
199
197
200
198
## How it works
201
199
202
-
Factory `(ctx) => handlers`. `src/state.js` opens a fresh closure per `createWorker` with handle tables (`nodes`, `bindings`, `files`, observers, animations), `alloc` / `node` / `allocList` helpers, and `cleanSubtree`. Eight handler slices (`tree`, `style`, `events`, `forms`, `observers`, `animations`, `media`, `platform`) each return an object literal of handlers closing over the shared state; `src/index.js` composes them with `Object.assign` and wraps async callbacks with `emitError` so failures surface via `bind_global_error`. Adding a handler is one entry in one slice.
200
+
Factory `(ctx) => handlers`. `src/main/state.js` opens a fresh closure per `createWorker` with handle tables (`nodes`, `bindings`, `files`, observers, animations), `alloc` / `node` / `allocList` helpers, and `cleanSubtree`. Eight handler slices in `src/main/` (`tree`, `style`, `events`, `forms`, `observers`, `animations`, `media`, `platform`) each return an object literal of handlers closing over the shared state; `src/index.js` composes them with `Object.assign` and wraps async callbacks with `emitError` so failures surface via `bind_global_error`. Adding a handler is one entry in one slice.
0 commit comments