Enum OnClose
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
در نزدیک شماره ای که مشخص می کند وقتی URL باز شده از طریق Open Link
بسته می شود چه کاری انجام شود.
هنگامی که یک پیوند باز می شود، مشتری یا آن را فراموش می کند یا منتظر می ماند تا پنجره بسته شود. پیاده سازی به قابلیت های پلت فرم مشتری بستگی دارد. On Close
ممکن است باعث شود Open As
نادیده گرفته شود. اگر پلتفرم مشتری نتواند هر دو مقدار انتخاب شده را با هم پشتیبانی کند، On Close
اولویت دارد.
برای فراخوانی یک enum، کلاس والد، نام و ویژگی آن را فراخوانی می کنید. به عنوان مثال، CardService.OnClose.RELOAD
.
خواص
اموال | تایپ کنید | توضیحات |
---|
NOTHING | Enum | هیچ کاری از نزدیک انجام نده پیش فرض |
RELOAD | Enum | وقتی پنجره بسته می شود، افزونه را دوباره بارگیری می کند. اگر Open As.OVERLAY نیز تنظیم شده باشد، کارت اصلی مسدود می شود تا زمانی که پنجره همپوشانی بسته شود و بارگیری مجدد افزونه تمام شود. |
خواص منسوخ شده
اموال | تایپ کنید | توضیحات |
---|
RELOAD_ADD_ON | Enum | با بستن URL، افزونه را دوباره بارگیری کنید. این عمل با RELOAD متفاوت است زیرا هنگام نمایش پنجره Open As.OVERLAY کارت اصلی را مسدود نمی کند. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\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. |"]]