Hey guys, say I have a single panel I want to use for both Illustrator and Photoshop. In JavaScript I can use csInterface to find the host application then route through a conditional to do app-specific actions, I figured I could just evalScript to different app-specific functions in doing so -- but I've noticed that having separate DOM references within my .jsx will cause the entire .jsx to fail. If I have a script that works perfectly in Photoshop but add something like app.isFill() anywhere in that .jsx, it returns Extendscript Fail -- even if I don't initiate it on auto-execute and try to put it in a conditional like `if (app.name === 'Adobe Illustrator'){alert (app.isFill());};`.
Is there a way to sneak cross-application DOM references in the same script? If not, then what would I need to do here?