std1.0.0-beta-7 SafeC docs

std :: wasm::dom

Type alias std::DomEventHandler

#include <std/wasm/dom.h> source

typedef fn void(?&Erased userdata) DomEventHandler

Stored type-erased (the table holds handlers with unrelated context types); the generic wrappers below are the only writers and always pair a handler with userdata of the matching type. A callback id is slot + DOM_MAX_CALLBACKS * generation, so an id whose slot was freed and reused (a timer that already fired, say) is recognized as stale.

erased, see std/erased.h