Enum OnClose
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
OnChiudi
Un enum che specifica cosa fare quando viene chiuso un URL aperto tramite un OpenLink
.
Quando un link viene aperto, il client lo dimentica o attende che la finestra venga chiusa.
L'implementazione dipende dalle funzionalità della piattaforma client. OnClose
potrebbe causare l'ignoramento di OpenAs
. Se la piattaforma client non supporta entrambi i valori selezionati contemporaneamente,OnClose
ha la precedenza.
Per chiamare un enum, devi chiamare la relativa classe, il nome e la proprietà di base. Ad esempio,
CardService.OnClose.RELOAD
.
Proprietà
Proprietà | Tipo | Descrizione |
NOTHING | Enum | Non fare nulla alla chiusura. Predefinita. |
RELOAD | Enum | Ricarica il componente aggiuntivo quando la finestra si chiude.
Se è impostato anche OpenAs.OVERLAY , la scheda principale viene bloccata finché la finestra di overlay non viene chiusa e il ricaricamento del componente aggiuntivo non è stato completato.
|
Proprietà ritirate
Proprietà | Tipo | Descrizione |
RELOAD_ADD_ON | Enum | Ricarica il componente aggiuntivo alla chiusura dell'URL. Questa azione è diversa da RELOAD in quanto non blocca la scheda principale durante la visualizzazione di una finestra OpenAs.OVERLAY . |
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-26 UTC.
[null,null,["Ultimo aggiornamento 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. |"]]