Created
May 15, 2020 03:56
-
-
Save apivat60/c66e8053f0e817a67d02ec5416ae319c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function include(filename) { | |
return HtmlService.createHtmlOutputFromFile(filename).getContent(); | |
} | |
function render(file, argsObject){ | |
var tmp = HtmlService.createTemplateFromFile(file); | |
if(argsObject) { | |
var keys = Object.keys (argsObject); | |
keys.forEach(function(key){ | |
tmp[key] = argsObject[key]; | |
}); | |
} | |
return tmp.evaluate().setXFrameOptionsMode(HtmlService.XFrameOptionsMode. ALLOWALL); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment