Can you use ES2015+ features (ES6) in Adobe XD plugins?

≯℡__Kan透↙ 提交于 2021-02-10 13:33:09

问题


I'm building a plugin in Adobe XD. Can I use ES2015+ (ES6) features? For example, template literals, let , const, Arrow functions, asynchronous functions ( async / await )?


回答1:


XD plugin APIs support most of ES2015 and beyond. You can use features such as:

  • Template literals
  • Classes
  • Block-scoped variables ( let , const )
  • Object destructuring
  • Default parameters
  • Spread and Rest ( ... )
  • Arrow functions
  • Asynchronous functions ( async / await )
  • Promises

You can also use ES5 JavaScript features as well.

The XD plugin API docs have a page on JavaScript support.



来源:https://stackoverflow.com/questions/53213787/can-you-use-es2015-features-es6-in-adobe-xd-plugins

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!