Skip to content Skip to sidebar Skip to footer

Enforcing Strict Mode In Google-apps-script Files Using Chrome On Chromebook

In google-apps-script script file is it possible to set 'use strict'? I've created a function to test this function a () { //logs - function a 'use strict'; Logger.log(argume

Solution 1:

Apps Script does not support strict mode on the server. If you use HtmlService, all client script code you write is implicitly strict mode whether or not you specify "use strict".

Solution 2:

Not possible on the old runtime (Rhino) but it's possible on the new runtime (V8).

There are reports of scripts that used to work on the old runtime that are not working on the new runtime, so plan to do some tests before applying this change on "production".

Resources

Post a Comment for "Enforcing Strict Mode In Google-apps-script Files Using Chrome On Chromebook"