- From: Domenic Denicola <notifications@github.com>
- Date: Wed, 27 Aug 2025 21:33:02 -0700
- To: w3ctag/design-reviews <design-reviews@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 28 August 2025 04:33:06 UTC
domenic left a comment (w3ctag/design-reviews#1089) > Edit to note: And `ExtendableEvent` picks up a different default. Unless explicitly acted upon, it will not extend the lifetime of the worker. I think that's valuable, even if browsers do need to have a backstop. I don't think the default is actually different, because in both cases we're discussing, the web developer opts-in to add code which extends the lifetime of the worker. With the proposal as-is, that code is: ```js document.addEventListener("pagehide", () => { const worker = new SharedWorker(url, { extendedLifetime: true }); worker.postMessage({ runCleanupOrExitUsingThisData: item }); }); ``` With the TAG proposal, that code is: ```js await SharedWorker.runCleanupOnExit(url, item); ``` I can appreciate that the latter is a bit nicer to type, but I don't think it changes the properties of the proposal in terms of default behavior. In both cases, the default behavior (with no code added) is to not start the worker at all. -- Reply to this email directly or view it on GitHub: https://github.com/w3ctag/design-reviews/issues/1089#issuecomment-3231840244 You are receiving this because you are subscribed to this thread. Message ID: <w3ctag/design-reviews/issues/1089/3231840244@github.com>
Received on Thursday, 28 August 2025 04:33:06 UTC