Skip to content

Commit 9b428aa

Browse files
author
Eric Koleda
authored
Fixing note about closing tabs/windows.
1 parent 9ac84c0 commit 9b428aa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,10 @@ to the user.
138138
}
139139
}
140140

141-
**Note:** In an Apps Script UI it's not possible to automatically close a window
142-
or tab, so you'll need to direct the user to close it themselves.
141+
If the authorization URL was opened by the Apps Script UI (via a link, button, etc)
142+
it's possible to automatically close the window/tab using `window.top.close()`.
143+
You can see an example of this in the sample add-on's
144+
[Callback.html](samples/Add-on/Callback.html#L47).
143145

144146
### 4. Get the access token
145147

0 commit comments

Comments
 (0)