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

Neither QML WebView or WebEngineView cannot load JS in release build

XMLWordPrintable

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

      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.  

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes