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

Add a way to call native functions from javascript

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • WebEngine
    • None

    Description

      The idea is to be able to interact somewhat directly with V8 and to be able to expose C++ functions to JavaScript.

      My understanding is that the native C++ code must be in QtWebEngineProcess.exe.
      One possible solution is to have QtWebEngineProcess.exe load user plugins that contain the native C++ code.

      To make this useful likely the plugins need to communicate through IPC with the main application. Maybe it can be handled "Qt side" which would require adding a "sendIPCMessage()" function to QWebEnginePage. Or it could be left to the users to do their own IPC, but it would require sharing an ID of some sort so that they can indentify which process is associated to which QWebEnginePage (maybe the existing renderProcessPid is enough?).

      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
            bterrier Benjamin Terrier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes