Javascript async keyword not recognized for a class method
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?
Copy link to clipboard
Copied
Optionally, you can add it to JS Lint Configuration File from Site settings. See screenshot.
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
Copy link to clipboard
Copied
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.

