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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.11.2
    • 5.9.3, 5.11.1
    • WebEngine
    • 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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            allan.jensen Allan Sandfeld Jensen
            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