Copy link to clipboard
Copied
The differences between JS and JSX is really annoying when developing panels, as some things work for one language and not for the other.
I just noticed that the endsWith() -string function doesn't work in JSX. I'm trying to check if a layer name ends with a special character, like this:
alert("lolk_".endsWith("_"));
This will halt script execution. Cmon! Do I really need to use a regex for super simple things like this? It's ridiculus!
1 Correct answer
Explore related tutorials & articles
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Voted!
Copy link to clipboard
Copied
But you probably noticed that the number of votes is not particularly large for Photoshop standards so …
Copy link to clipboard
Copied
I wouldn't certainly hold my breath waiting for modern JS to be implemented in ExtendScript (my bet is that we'll never get there) – you're better off using shims. There's also a new project that you might want to try here.
Davide
---
HTML Panels Development Course

