ReadonlycapabilitiesWhat this driver supports. Used by consumers to pick the right driver for their environment.
ReadonlynameStable name for diagnostics + registry lookup. Conventionally
algorithm-named (e.g. 'microtask-batch', 'send-beacon').
Hand the work to the driver's scheduling mechanism. MUST return
synchronously with a fresh DetachHandle. The actual work may
run later (next microtask / setImmediate / browser-beacon-flush /
worker-thread / etc.) on the driver's chosen mechanism.
OptionalvalidateOptional preflight hook, invoked explicitly by the caller, never
automatically by the detach entry points. It may throw if the
configuration is invalid. schedule() must independently report
scheduling failures through its handle, even without preflight.
Example: sendBeaconDriver.validate() checks
typeof navigator?.sendBeacon === 'function' and throws with a
helpful message if absent (e.g., in Node).
A driver is the WHEN/HOW of the detach. Maps
(child, input, refId)to aDetachHandlewhose lifecycle the driver owns.Drivers are themselves footprintjs primitives — internally they may be a single function or a multi-stage flowChart. Either way, the interface they expose to consumers is
schedule(...).Drivers MUST:
handle.status = 'failed',handle.error = ...)detach*call never waits for the driver's deferred work to completeDrivers MAY:
validate()for explicit caller-controlled preflight checks (e.g., assertnavigator.sendBeaconexists). Scheduling must still contain failures when preflight was not requested.Example
Example