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

Provide some way to modify evaluation context of imported JavaScript

XMLWordPrintable

      Some 3rd party JavaScript libraries assume the existence of certain constructor functions (eg, function Image(..)

      { ... }

      ). These functions are usually provided by the browser's JavaScript environment. If we want to allow such libraries to be imported without requiring modification, we need some way to allow modification of the evaluation context, so that these functions can be provided.

      Phases:

      1) Research various possibilities which allow this:

      • allow "unqualified" JavaScript import – uses the parent context as the evaluation context, thereby allowing symbols / functions to be added to the evaluation scope
      • add a "with" syntax or similar to import statements – provide a second JavaScript file which provides/sets up the evaluation context
      • something else

      2) Develop prototype implementation

      3) Test and document the feature

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

            shausman Simon Hausmann
            chriadam Christopher Adams (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 2 weeks
                2w
                Remaining:
                Remaining Estimate - 2 weeks
                2w
                Logged:
                Time Spent - Not Specified
                Not Specified

                  There are no open Gerrit changes