# Is there a UXP equivalent for eval / dynamic JavaScript execution?

**URL:** <https://forums.creativeclouddeveloper.com/t/is-there-a-uxp-equivalent-for-eval-dynamic-javascript-execution/12256>\
**Category:** UXP Plugin API\
**Tags:** ui, uxp, javascript\
**Created:** [October 2, 2026, 4:56pm UTC](https://forums.creativeclouddeveloper.com/t/is-there-a-uxp-equivalent-for-eval-dynamic-javascript-execution/12256 "2026-10-02T16:56:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gowtham](https://avatars.discourse-cdn.com/v4/letter/g/b4bc9f/32.png) [@Gowtham](https://forums.creativeclouddeveloper.com/u/Gowtham)\
**Post date:** [October 2, 2026, 4:56pm UTC](https://forums.creativeclouddeveloper.com/t/is-there-a-uxp-equivalent-for-eval-dynamic-javascript-execution/12256/1 "2026-10-02T16:56:15Z")

</div>

We are migrating a Photoshop CEP plugin to UXP.

In our CEP implementation, we receive JavaScript/ExtendScript code as a **string at runtime** and execute it dynamically. The supplied script can define functions, for example:

```auto
function abc() {
    // ...
}

function xyz() {
    // ...
}

```

After evaluating the script, our application calls those functions.

Is there a supported equivalent in UXP for executing JavaScript code supplied as a string at runtime, similar to `eval()` / CEP’s dynamic script execution?

If `eval()` or equivalent dynamic execution is not supported in UXP, what is the Adobe-recommended approach for this use case?

The important requirement for us is that the JavaScript is supplied dynamically at runtime and is not known when the UXP plugin is packaged.
