A simple extension to capture Ctrl+W and send keyboard event to xterm to avoid closing the tab accidentally.
How to use
1. Install this extension
2. Go to extension shortcut configuration page of your browser
edge://extensions/shortcuts for Edge
chrome://extensions/shortcuts for Chrome
3. Find this extension and configure "Capture ctrl+w" command's keyboard shortcut to "Ctrl + W"