• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Javascript async keyword not recognized for a class method

Explorer ,
Oct 06, 2021 Oct 06, 2021

Copy link to clipboard

Copied

Using Dreamweaver for coding php is really different from JavaScript where I had to turn off a lot of uneuseful "errors" warnings. I did it consulting the experts and documentation of ecmascript starndards.

But as I started to work with classes, this error is appearing and disturbing the code debug. DW points the error and won't check the rest:

    async cameraIni() {
        var inst = this;
        this.Camera.inibutton.disabled = true;
        this.Camera.stream = await navigator.mediaDevices.getUserMedia({ video: true, audio: false });
        this.Camera.video.srcObject = this.Camera.stream;
        console.log("imgUpload Camera straming...");
        this.Camera.video.play();
    }

ERROR: Parsing error: Unexpected token cameraIni

The code will work normally in browsers, also is widelly used by this kind of application with media.

I think we might consider this a real bug. Is there some workaround? 

TOPICS
Code , Error , Product issue

Views

406

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 06, 2021 Oct 06, 2021

Copy link to clipboard

Copied

Optionally, you can add it to JS Lint Configuration File from Site settings.  See screenshot.

 

image.png

 

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 06, 2021 Oct 06, 2021

Copy link to clipboard

Copied

If, what Nancy has said, does not work, then think about running Visual Studio alongside Dreamweaver. Visual studio for JS

Wappler, the only real Dreamweaver alternative.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 08, 2021 Oct 08, 2021

Copy link to clipboard

Copied

LATEST

Thank's but my notebook is not enough to run Dreamweaver and Visual Studio (and other tools needed). I have some C# projects that I use Visual Studio, don't know it's JS capatilities... will try, I have some (almost) pure JavaScript projects.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines