Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Using QWebChannel into Web SharedWorker

Using QWebChannel into Web SharedWorker

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 165 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Alexey Serebryakov
    wrote on last edited by Alexey Serebryakov
    #1

    Hi guys!

    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.
    So,

    //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, ...) { ... };
    

    But import qwebchannel.js into myworker.js doesn't allowed.

    Any ideas?

    Thanks a lot,
    Alex

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved