<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Using QWebChannel into Web SharedWorker]]></title><description><![CDATA[<p dir="auto">Hi guys!</p>
<p dir="auto">I have common web socket connection created into SharedWorker and I wish to use QWebChannel. But I don't know how can I create it.<br />
So,</p>
<pre><code>//login.hml
// contains login form and login.js
// also include qwebchannel.js

//login.js
// create shared worker
let webSocketWorker = new SharedWorker("myworker.js");

//myworker.js
// import QWebChannel from "./qwebchannel.js" // error

// create web socket client
let ws = new WebSocket(url);

// I wish following but QWebChannel unavailable here
let channel = new QWebChannel(ws, ...) { ... };
</code></pre>
<p dir="auto">But import qwebchannel.js into myworker.js doesn't allowed.</p>
<p dir="auto">Any ideas?</p>
<p dir="auto">Thanks a lot,<br />
Alex</p>
]]></description><link>https://forum.qt.io/topic/162199/using-qwebchannel-into-web-sharedworker</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 16:15:30 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/162199.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 21 May 2025 01:41:41 GMT</pubDate><ttl>60</ttl></channel></rss>