Skip to content

Instantly share code, notes, and snippets.

  • Save apivat60/c66e8053f0e817a67d02ec5416ae319c to your computer and use it in GitHub Desktop.
Save apivat60/c66e8053f0e817a67d02ec5416ae319c to your computer and use it in GitHub Desktop.
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