Search code examples
javascriptpluginsevaladobe-xd

Using `eval` when building XD plugins


Is it possible to use eval or similar functions for executing code inside the XD plugin file?


Solution

  • From 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.

    Some options:

    Credits: Kerri Shotts from Adobe.