Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.12.1
-
73231fe953145ac0df4e62f173e1a90076466012 (qt/qtdeclarative/5.12) eeb00570679c447f4701a92cd2e836f098724979 (qt/qtdeclarative/5.12) 426f3035a3753800ce340a83bdf8db13922f4cae (qt/qtdeclarative/dev)
Description
Starting with Qt 5.12.1, the JavaScript engine seems to be more restrictive, which makes using some existing 3rd party JavaScript libraries impossible. I've created a stripped down example to demonstrate this here: https://gist.github.com/mhoeher/1a7a5131031f40909283936107471cb9
Basically, what I try to do is to use the 3rd party JavaScript library showdown.js to convert Markdown formatted text to HTML to display it within a QML application.
For this, I have a wrapper JavaScript library which looks like this:
Qt.include("showdown.js", function(status) { if (status.exception !== undefined) { console.warn("Failed to load showdown.js: ", status.exception); } }); function md2html(markdown) { var converter = new showdown.Converter(); converter.setFlavor('github'); return converter.makeHtml(markdown); }
This worked fine up to Qt 5.12.0. However, starting with Qt 5.12.1, the library cannot be loaded anymore and on the console I get the following error message:
qml: Failed to load showdown.js: SyntaxError: Maximum statement or expression depth exceeded
I am not sure if this new behaviour is intended, however, it makes using (some) 3rd party JavaScript libraries impossible