Enum OnClose
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
オン閉じる
OpenLink
で開いた URL が閉じられたときに行う操作を指定する列挙型。
リンクが開かれると、クライアントはリンクを忘れるか、ウィンドウが閉じられるまで待ちます。実装は、クライアント プラットフォームの機能によって異なります。OnClose
を使用すると、OpenAs
が無視される場合があります。選択した値の両方をクライアント プラットフォームで同時にサポートできない場合、OnClose
が優先されます。
列挙型を呼び出すには、その親クラス、名前、プロパティを呼び出します。たとえば、
CardService.OnClose.RELOAD
です。
プロパティ
プロパティ | タイプ | 説明 |
NOTHING | Enum | 閉じるときに何もしない。デフォルトです。 |
RELOAD | Enum | ウィンドウが閉じるとアドオンを再読み込みします。
OpenAs.OVERLAY も設定されている場合、オーバーレイ ウィンドウが閉じられ、アドオンの再読み込みが完了するまで、メインカードはブロックされます。
|
サポートが終了したプロパティ
プロパティ | タイプ | 説明 |
RELOAD_ADD_ON | Enum | URL を閉じるとアドオンが再読み込みされます。このアクションは、OpenAs.OVERLAY ウィンドウを表示している間、メインカードをブロックしないという点で RELOAD とは異なります。 |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[[["\u003cp\u003e\u003ccode\u003eOnClose\u003c/code\u003e is an enum used within \u003ccode\u003eOpenLink\u003c/code\u003e to specify an action taken when the opened URL is closed by the user.\u003c/p\u003e\n"],["\u003cp\u003eIt offers options like \u003ccode\u003eNOTHING\u003c/code\u003e (default) and \u003ccode\u003eRELOAD\u003c/code\u003e to reload the add-on upon closing the URL, with \u003ccode\u003eRELOAD\u003c/code\u003e potentially blocking the main card if used with \u003ccode\u003eOpenAs.OVERLAY\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAlthough previously available, the \u003ccode\u003eRELOAD_ADD_ON\u003c/code\u003e option is now deprecated and should not be used in new developments.\u003c/p\u003e\n"]]],[],null,["# Enum OnClose\n\nOnClose\n\nAn enum that specifies what to do when a URL opened through an [OpenLink](/apps-script/reference/card-service/open-link) is closed.\n\nWhen a link is opened, the client either forgets about it or waits until the window is closed.\nThe implementation depends on the client platform capabilities. [OnClose](#) may cause [OpenAs](/apps-script/reference/card-service/open-as) to be ignored; if the client platform cannot support both selected values together,\n[OnClose](#) takes precedence.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nCardService.OnClose.RELOAD`. \n\n### Properties\n\n| Property | Type | Description |\n|-----------|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `NOTHING` | `Enum` | Do nothing on close. Default. |\n| `RELOAD` | `Enum` | Reloads the add-on on when the window closes. If [OpenAs.OVERLAY](/apps-script/reference/card-service/open-as#OVERLAY) is also set, then the main card is blocked until the overlay window is closed and the add-on has finished reloading. |\n\n### Deprecated properties\n\n| Property | Type | Description |\n|-----------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `RELOAD_ADD_ON` | `Enum` | Reload the add-on on closing the URL. This action differs from [RELOAD](#RELOAD) in that it does not block the main card while showing an [OpenAs.OVERLAY](/apps-script/reference/card-service/open-as#OVERLAY) window. |"]]