Оптимизируйте свои подборки Сохраняйте и классифицируйте контент в соответствии со своими настройками.
При закрытии
Перечисление, указывающее, что делать, когда URL-адрес, открытый через Open Link закрывается.
При открытии ссылки клиент либо забывает о ней, либо ждет, пока окно закроется. Реализация зависит от возможностей клиентской платформы. On Close может привести к игнорированию Open As ; если клиентская платформа не может поддерживать оба выбранных значения вместе, приоритет имеет значение On Close .
Чтобы вызвать перечисление, вы вызываете его родительский класс, имя и свойство. Например, CardService.OnClose.RELOAD .
Характеристики
Свойство
Тип
Описание
NOTHING
Enum
Ничего не делайте при закрытии. По умолчанию.
RELOAD
Enum
Перезагружает дополнение при закрытии окна.
Если также установлено Open As.OVERLAY , то основная карта блокируется до тех пор, пока окно оверлея не закроется и надстройка не завершит перезагрузку.
Устаревшие свойства
Свойство
Тип
Описание
RELOAD_ADD_ON
Enum
Перезагрузите надстройку при закрытии URL-адреса. Это действие отличается от RELOAD тем, что оно не блокирует основную карту при отображении окна Open As.OVERLAY .
[[["Прост для понимания","easyToUnderstand","thumb-up"],["Помог мне решить мою проблему","solvedMyProblem","thumb-up"],["Другое","otherUp","thumb-up"]],[["Отсутствует нужная мне информация","missingTheInformationINeed","thumb-down"],["Слишком сложен/слишком много шагов","tooComplicatedTooManySteps","thumb-down"],["Устарел","outOfDate","thumb-down"],["Проблема с переводом текста","translationIssue","thumb-down"],["Проблемы образцов/кода","samplesCodeIssue","thumb-down"],["Другое","otherDown","thumb-down"]],["Последнее обновление: 2025-07-24 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,["OnClose\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\nProperties\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\nDeprecated 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. |"]]