Do not do this if you plan on distributing your plugin to others. There is no guarantee that plugins that run JSX like this will continue to work in the future, and your plugin may be removed from the marketplace.
Convert to batchPlay
and the PS DOM API instead.