Sign in
cobalt
/
cobalt
/
56d7c4e1a836a7ef6e2823bffb8d1567758b82eb
/
.
/
third_party
/
web_platform_tests
/
service-workers
/
service-worker
/
resources
/
claim-shared-worker-fetch-worker.js
blob: ddc8bea7af476e1ace023a693c31c463b7a077e5 [
file
] [
log
] [
blame
]
self
.
onconnect
=
(
event
)
=>
{
var
port
=
event
.
ports
[
0
];
event
.
ports
[
0
].
onmessage
=
(
evt
)
=>
{
fetch
(
evt
.
data
)
.
then
(
response
=>
response
.
text
())
.
then
(
text
=>
port
.
postMessage
(
text
));
};
};