Wix supports working in JavaScript to develop websites, as well as some special features, including:
You can work in JavaScript in:
Wix supports modern JavaScript features up through and including the ES2020 standard.
You can use promises, async/await, and arrow functions, which were introduced with ES2017.
Browsers are gradually adopting the ES2019 standard. Until these standards are fully implemented, Wix transpiles your code into ES5, so it can run in current browsers. Wix supports source maps, so that even though the browser runs transpiled ES5 code, you can debug your ES2019 source code in your browser's developer tools.
Wix supports the native module functionality included in the ES2015 release of JavaScript.
To use ES2015 module functionality, you need to follow the ES2015 Module Syntax. Only those items specifically exported in a module are exposed to other files. All other items in your module are internal to the module only.
For examples of how to use this functionality, see MDN's JavaScript modules guide.
Notes:
events.js, data.js, or routers.js files. For more information, see Module Export Syntax.The following is a list of guidelines that define how you can share modules and functions between, and in, the backend and public scopes: