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

[REG: 5.11 -> 5.12] "use strict" in WorkerScript does not allow calling functions defined outside of onMessage function

XMLWordPrintable

      To reproduce, run attached example. w.js contains:

      'use strict';
      function func() {
          console.log("func was called")
      }
      
      WorkerScript.onMessage = function(msg) {
          func()
      }
      

      And it will say:

      qrc:/w.js:7: TypeError: undefined is not a function
      

        1. qtbug71624.tar.gz
          1 kB
          Joni Poikelin
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            laknoll Lars Knoll
            poikelin Joni Poikelin
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes