mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-20 07:09:46 -05:00
80cc83d0aa
Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
15 lines
258 B
JavaScript
15 lines
258 B
JavaScript
self.onconnect = (event) => {
|
|
const port = event.ports[0]
|
|
|
|
port.onmessage = (e) => {
|
|
// eslint-disable-next-line no-undef
|
|
importScripts('/sw.js')
|
|
|
|
if (e.data.foo === 'baz') {
|
|
port.postMessage({
|
|
foo: 'baz2',
|
|
})
|
|
}
|
|
}
|
|
}
|