Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which ECMAScript standards comply Adobe's ExtendScript implementation? (if any)

I'm a JavaScript developer, who has just begun to dive into Adobe's ExtendScript technology, aiming to improve productivity and workflow on many of my enterprise's daily tasks on Illustrator PDF form generation.

In first instance I thought it was an implementation of some ECMAScript standards with addition of a propertary implementation of a Document Object Model, an API for accessing the file system and some other stuff. I was hoping the last version of the Creative Suite (CS6) implemented ECMAScript 5.

My first surprise was not finding any reference on the internet about the implementation details of the ExtendScript engine. My second surprise was finding, when querying Array.prototype for some ECMAScript 5 methods, that it is undefined, which makes me doubt of the standards-compliance of the implementation.

Can anyone provide any reference on that implementation details, if it complies any ECMAScript standard and which version?

Lots of thanks in advance.

like image 584
Áxel Costas Pena Avatar asked Jun 20 '13 20:06

Áxel Costas Pena


People also ask

Is ExtendScript JavaScript?

Adobe provides an extended implementation of JavaScript, called ExtendScript, that is used by many Adobe applications that provide a scripting interface.

What is Adobe ExtendScript?

ExtendScript is a scripting language and an associated toolkit developed by Adobe Systems, intended for use with Creative Suite and Technical Communication Suite products. It is a dialect of the ECMAScript 3 standard and therefore similar to JavaScript and ActionScript.


2 Answers

If you look at the After Effects CS6 Scripting Guide, it says:

The After Effects scripting engine supports the 3rd Edition of the ECMA-262 Standard, including its notational and lexical conventions, types, objects, expres- sions, and statements. ExtendScript also implements the E4X ECMA-357 specification, which defines access to data in XML format.

I imagine the rest of the Adobe Collection is the same.

like image 65
Matthew Chung Avatar answered Oct 26 '22 07:10

Matthew Chung


You can add the ECMAScript 5 array methods to ExtendScript by including a modified version of this polyfill. The one modification you need to make is at the very end of array.generics.js, remove the block of code scoped by if (document). (around line 583).

like image 42
J. Peterson Avatar answered Oct 26 '22 06:10

J. Peterson