在构建 XD 插件时使用“eval”

Using `eval` when building XD plugins

是否可以使用 eval 或类似函数来执行 XD 插件文件中的代码?

Adobe XD Platform...

No. eval and similar methods of executing code are disabled. This is for a variety of reasons, including security-related concerns.

This doesn’t, however, prevent you from running arbitrary code – it just means you have to get inventive. Before considering this path, however, be sure to consider whether or not you really need to run arbitrary code, as there may be considerable risks to doing so.

部分选项:

致谢: Kerri Shotts 来自 Adob​​e。