Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-4614

Javascript dynamic import shows as error in editor but executes fine in browser

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Duplicate
    • 12.0, 12.4, 12.5
    • None
    • javascript - Editor
    • Windows 10
      Java 13
      Chrome Version 84.0.4147.89 (Official Build) (64-bit)

    Description

      Javascript dynamic import  shows error on "import" statement yet runs fine in Chrome browser

      Possible duplication of NETBEANS-4597 - not sure

      Documentation reference to MDN is https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import

      Netbeans Project properties - JavaScript - ECMAScript set to 7 and then to 6 - no effect.

       Script source code:
      async function importTest()

      { const

      { WebSockets }

      = await import('./app/WebSockets.js');

      }

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              grahams777 Graham Smith
              Votes:
              4 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: