interface WorkerTiming
How much of itself the worker should describe on its own timeline.
A message rather than a query on the worker's URL, and the four reasons are worth keeping because the URL idea comes back:
browserWorker.tsuses the statically analyzednew Worker(new URL('…', import.meta.url))form. Interpolating a runtime value defeats Vite's detection and the worker chunk stops being emitted.apps/game/public/sw.jstreats/assets/as cache-first with a barecaches.match(request)and noignoreSearch, so a query-suffixed worker misses the cache on an offline launch.- Inside a module worker the query is on
self.location.search, not onnew URL(import.meta.url).searchParams. - And the premise is false anyway. A URL is read once at spawn, while the
level changes mid-session from
ir.timing()and from the performance panel — which would leave the worker tracks silently empty for the rest of the session.
level is a bare string here on purpose. Which levels exist is the host's
vocabulary, not the protocol's; this validates that a string arrived and the
worker entry decides whether it names anything.
Members
kindreadonly
kind: 'timing'
levelreadonly
level: string