jeugro
September 6, 2021, 10:04am
1
Hi,
we built a Windows app using some JavaScript library (pdfjs) with their source code using optional chaining operator (?.).
The app builds and installs fine but won’t start complaining about syntax errors in this JavaScript library.
I know it’s not directly related to the build process but do you have any insights as to which JS engine is used to run Windows mobile clients and/or which limitations exist on Windows in terms of JS usage.
Thanks a lot,
Jens-Uwe
ghenne
September 7, 2021, 10:45am
2
The Cordova Windows implementation is based on Edge - in other words, JavaScript UWP , using Visual Studio 2017.
Microsoft dropped support for this in VS 2019, so it’s likely the version of JavaScript it uses is older.
There is a fuller discussion here:
opened 08:06AM - 08 Apr 19 UTC
closed 07:52AM - 09 Jan 23 UTC
discussion
# Bug Report
## Problem
Cordova Windows projects no longer function in the… latest Visual Studio release (2019).
### What is expected to happen?
Cordova Windows Visual Studio solutions open, compile, and deploy successfully using the latest Visual Studio release.
### What does actually happen?
None of the above.
## Information
### Command or Code
`cordova run windows`
### Environment, Platform, Device
The official Visual Studio 2019 release drops all support for JavaScript UWP projects. Per it’s [release notes](https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes):
> UWP JavaScript apps are no longer supported in Visual Studio 2019. You cannot create or open JavaScript UWP projects (files with extension jsproj).
As best as I can tell, the only two paths forward for Cordova apps using .NET plugins are 1) Cordova-Electron + Edge.js, or 2) writing a custom UWP host with a full-screen WebView (perhaps using [WebView.Interop](https://github.com/shweaver-MSFT/WebView.Interop).
### Version information
<!--
What are relevant versions you are using?
For example:
Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins
Other Frameworks: Ionic Framework and CLI version
Operating System, Android Studio, Xcode etc.
-->
## Checklist
- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above