Skip to content

Commit 5b9eac6

Browse files
committed
feat: add optional duration param to delayedClose()
1 parent 39c608c commit 5b9eac6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

form-utilities.js.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
//
3838
// Problem #2 is why other code never calls gs.host.close()
3939
// directly, even in cases where problem #1 is not at stake.
40-
function delayedClose() {
41-
setTimeout(() => { google.script.host.close(); }, 300);
40+
function delayedClose(duration = 300) {
41+
setTimeout(() => { google.script.host.close(); }, duration);
4242
}
4343
</script>

0 commit comments

Comments
 (0)