Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-69904

JavaScript world IDs above 11 don't work (callback is never called)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.9.3, 5.11.1
    • Fix Version/s: 5.11.2
    • Component/s: WebEngine
    • Labels:
      None

      Description

      When using a QWebEngineScript (with setWorldId) or QWebEnginePage::runJavaScript and passing in a world ID above 11, the callback never gets called.

      Example:

      #include <QApplication>
      #include <QWebEngineView>
      #include <QDebug>
      
      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
          QWebEngineView view;
      
          int world = 12;
          view.page()->runJavaScript("1 + 1", world, [](QVariant res){qDebug() << res; });
      
          return app.exec();
      }
      

      If the world id is changed to 11, it prints the output as expected. With world id 12, there's no output.

        Attachments

        For Gerrit Dashboard: QTBUG-69904
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            allan.jensen Allan Sandfeld Jensen
            Reporter:
            the compiler Florian Bruhin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes