5 Replies Latest reply on Sep 23, 2016 2:05 PM by Eugen Tepin

    How to safely patch Photoshop (CS family) scripting core from es3 to es5

    Eugen Tepin

      Hello, everybody.

      I write script that automates some routine work of designers, that works with Photoshop. And by the time, i have noticed that some part of my code repeats from project to project, so i decided to wrap it into reusable modules.


      I choose npm-packages (node.js) for that purpose. And it opened a great opportunity of using other npm-packages (CSV parser for example) in my projects! And moreover, to use webpack to make production builds of my scripts, minify, lint and test my scripts in automated way. But i faced with some difficulties in my way to bright future ))).


      The point is that Photoshop (CS family) uses extension of es3 standard (if i am not mistaken), and i want to patch it to es5 standard as much as possible. There is several polyfills for js engine, like:

      But, all of them designed with browsers (as a context of execution) in mind. Some of them seems to work fine in Photoshop environment, but i want to be more confident in that.

      Some polyfills developers supplies their libs with automated tests, it could solve my problem, but they (tests) also assume browser as environment, so it is hard to launch this tests in Photoshop for me.

      Well, i need help in making a list of polyfills that could be safely applied to Photoshop script engine, can anybody help me?