3 ms·
I've worked with this for some clients. I am but an egg, but I'm not convinced this is entirely JavaScript, I've had some code fail in App Script that passed J
by chernevik 14y ago
I've worked with this for some clients. I am but an egg, but I'm not convinced this is entirely JavaScript, I've had some code fail in App Script that passed JavaScript unit tests. And you cannot bring in libraries like jQuery.
You can hack some of these. Scripts can import code from a remote server, which allows you to edit where you like, push to your remote server and pull it into App Script. That tool enables small libraries, I've used it to write a simple test environment. I think you could test App Script JsTestDriver et al with some kind of mock-up strategy.
I haven't enjoyed it, but it has met the client requirements and that's the main thing, right?
- selectnull 14y agoIt is server side javascript and because of that there is not jQuery (which is client side library). You are not working with DOM, you are working with API defined by Apps Script, check the docs here https://developers.google.com/apps-script/ https://developers.google.com/apps-script/
- chernevik 14y agoI get that detachment from the DOM but jQuery has useful tools beyond element selection and manipulation. For that matter, why doesn't App Script expose an interface that expresses page components as part of a DOM? The Sheet app could provide an interface to a cell with classes for its particular column, row and sheet, allowing access with jQuery / CSS selectors. Instead users have to learn a new interface with stuff like Spreadsheeet.getRange(). And maybe they've revised the docs, but I spent a fair amount of time in them and didn't see any discussion of what JavaScript tools would not be available. I had to figure that out by trial and failure.