This was renamed in 2018 (https://github.com/w3c/ServiceWorker/pull/1333) but no bug was filed with WebKit, sorry about that. Anyway, this is that bug. I don't expect the rename to cause problems in the wild. Test to fail if targetClientId is present https://github.com/web-platform-tests/wpt/pull/29213.
As part of sorting out many errors in the browser compat data for FetchEvent in https://github.com/mdn/browser-compat-data/pull/10774, I noticed that no browser has shipped replacesClientId yet.
<rdar://problem/79189580>
WebKit exposes targetClientId so I guess we should do the migration to replacesClientId even if no other browser supports it. We can deal with this as part of bug 190313
targetClientId was removed in bug 235107, but replacesClientId wasn't implemented.
Can I please tackle this one? I've tried to follow the flow; is it correct that one should add a String, say "m_replacesClientIdentifier", to the "NetworkResourceLoader" in the network process, and do something similar to what is currently done with "m_resultingClientIdentifier"(propagate it all the way to where the "FetchEvent" is created in "ServiceWorkerFetch" within WebCore)?
You are more than welcome to contribute :) This bug might not be the easiest bug to tackle if this is your first WebKit contribution given there is probably few existing tests and no browser is implementing it yet: https://wpt.fyi/results/service-workers/idlharness.https.any.serviceworker.html?label=experimental&label=master&aligned The principle would be to add to new ScriptExecutionContextIdentifier member to either FetchOptions or ResourceLoaderOptions. See resultingClientId as an example.
Great! A quick search indeed did not reveal any wpt test, but there is again the example of testing for the presence of resultingClientId(https://github.com/web-platform-tests/wpt/blob/0a40de7a4db9e52cdb0fc436173640756740c9e3/service-workers/service-worker/fetch-event.https.html#L129) Thanks for the additional info, I will start looking into this.
Pull request: https://github.com/WebKit/WebKit/pull/13130