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

Neither QML WebView or WebEngineView cannot load JS in release build

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P1: Critical
    • None
    • 5.11.1
    • WebEngine, WebView
    • None
    • Linux/X11

    Description

      A simple HTML file loaded from resource, and also supportive content located in resources

      <!doctype html><html lang="en"><meta charset="utf-8"><head> <title>title</title> <link rel="stylesheet" type="text/css" href="markdown.css"/>

      <script src="marked.js" type="text/javascript" ></script> </head>

      <body> <div id="placeholder"> ... </div>

      <script type="text/javascript"> var placeholder = document.getElementById('placeholder'); var updateText = function(text) { placeholder.innerHTML = marked(text); }  </script>

      </body></html>

       

      Was unable to load a function "marked" from "marked.js" when release build is used.  The "updateText" in example is called from "runJavaScript" from QML.  Debug build works.  The same applies to "receipebrowser" example application: Release build does not work.

       

      After testing with timers etc. it somehow it looks the HTML standard is violated: <script></script> should be synchronous, but here it looks that the function is not available when it should. Check Qt's example app.

       

      I also added a tiny application: Darth Vader head is expected to be upside down regardless webview, webengine, debug and rotate build would be used.  

      Attachments

        1. webtest.7z
          6 kB
          Markus Mertama

        Issue Links

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

          Activity

            People

              qt_webengine_team Qt WebEngine Team
              mmertama Markus Mertama
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes