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

Reloading WebEngineView removes channel and underlying `window.qt`

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.7.1
    • 5.7.0 Beta
    • WebChannel, WebEngine
    • None
    • ca6762abde85fe3104ec4f064b85319474ba2deb

    Description

      Reloading the page rendered in a WebEngineView results in the web page unable to access `window.qt` in JavaScript for creating a channel. This is a regression from 5.6.

      The object exists on the view creation step and so works on first run through. A `reload()` of the page is enough to lose the object. Is this expected, or a genuine bug? If expected, what should the application do to re-establish the channel/`window.qt` on reload?

      Attached is a modified version of http://blog.trumpton.org.uk/2015/09/qt-webengineview-communication-with.html in an attempt to provide a minimal environment - but we stumbled into it on our project over at https://github.com/plexinc/plex-media-player - since reloading the page is a valid error handling state.

      Attachments

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

        Activity

          People

            jturcott Jocelyn Turcotte
            domc Dom Crayford
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes