Enum OnClose
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
사용닫기
OpenLink
를 통해 열린 URL이 닫힐 때 취할 조치를 지정하는 enum입니다.
링크가 열리면 클라이언트는 링크를 잊어버리거나 창이 닫힐 때까지 기다립니다.
구현은 클라이언트 플랫폼 기능에 따라 다릅니다. OnClose
는 OpenAs
가 무시될 수 있습니다. 클라이언트 플랫폼에서 선택한 두 값을 모두 지원할 수 없는 경우 OnClose
가 우선 적용됩니다.
enum을 호출하려면 상위 클래스, 이름, 속성을 호출합니다. 예를 들면
CardService.OnClose.RELOAD
입니다.
속성
속성 | 유형 | 설명 |
NOTHING | Enum | 닫을 때 아무 조치도 취하지 않습니다. 기본값입니다. |
RELOAD | Enum | 창이 닫힐 때 부가기능을 새로고침합니다.
OpenAs.OVERLAY 도 설정된 경우 오버레이 창이 닫히고 부가기능의 새로고침이 완료될 때까지 기본 카드가 차단됩니다.
|
지원 중단된 속성
속성 | 유형 | 설명 |
RELOAD_ADD_ON | Enum | URL을 닫을 때 부가기능을 새로고침합니다. 이 작업은 OpenAs.OVERLAY 창을 표시하는 동안 기본 카드를 차단하지 않는다는 점에서 RELOAD 와 다릅니다. |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 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. |"]]