What ECMAScript version is used in Max for JavaScript

jack3l's icon

Does anyone know if this is ES3/5/6 etc?

If it is not the latest, just curious why this might be the case since it seems only max is interpreting it and it is not some cross browser issue.

Let me know your thoughts one and all :)

J

jack3l's icon

By the way, I forgot to say that I am asking about Max 8

Valery_Kondakoff's icon
jack3l's icon

Thank you Valery, would you also know if there is some form of console.log or some other such ability to see the this.patcher object in the Max console?

Valery_Kondakoff's icon

post()? (Hopefully, I understand the question correctly).

jack3l's icon

Thanks Valery, you understood correct. I just wanted to check, if you do post(this.patcher) I was expecting the object itself but instead get an id number is that the same for you? I just want to find a way to print the Javascript object so I can more easily discover its methods and properties.

For example, this.patcher.newdefault and this.patcher.newobject do similar but different things but I dont know where to find the source code or API documentation on exactly what they do and why.

Just a man trying to teach himself how to fish in the Max JS world - I am already a decent JavaScript programmer from my day job

Valery_Kondakoff's icon

The best place to learn Max/MSP Jitter Javascript Reference is here: http://max-javascript-reference.tim-schenk.de/#gsc.tab=0
According to documentation this.patcher.newdefault and this.patcher.newobject do exactly the same: "Create a new object of class classname in a patcher using the specified parameters and return a Maxobj that represents it."

jack3l's icon

Thank you very much Valery...really appreciate your help with my questions :)

I will check this link out

loadmess's icon

I wonder why Max JS is not getting an update to the latest ECMAScript?

ak's icon

cycling74.com/forums/any-plans-to-update-support-for-recent-versions-of-js#reply-58ed21d5c2991221d9ccad8c
I think this is sill valid. Since Max8 has built-in Nodejs we can transpile "natively" in Max project.