You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add WebSocket sample
This sample demonstrates how to use a websocket in a service worker.
* add minimum chrome version
* Address comments
* add more detail to the readme
* make sure glitch instance is booted
* fix spelling
This example demonstrates how to use WebSockets in a MV3 Chrome Extension. Starting with Chrome version M116, WebSocket
4
+
activity will extend the service worker lifetime. In previous Chrome versions, the service worker will become inactive
5
+
while waiting for messages and disconnect the WebSocket.
6
+
7
+
## Running this extension
8
+
9
+
1. Clone this repository.
10
+
2. Load this directory in Chrome as an [unpacked extension](https://developer.chrome.com/docs/extensions/mv3/getstarted/development-basics/#load-unpacked).
11
+
3. Pin the extension from the extension menu.
12
+
4. Click the extension's action icon to start a web socket connection.
13
+
5. Click the extension's action again to stop the web socket connection.
14
+
6. Check the [service worker status](https://developer.chrome.com/docs/extensions/mv3/tut_debugging/#sw-status) to see when the service worker is active/inactive.
0 commit comments