// A button that opens as a link in an overlay and// requires a reload when closed.constbutton=CardService.newTextButton().setText('This button opens a link in an overlay window').setOpenLink(CardService.newOpenLink().setUrl('https://www.google.com').setOpenAs(CardService.OpenAs.OVERLAY).setOnClose(CardService.OnClose.RELOAD_ADD_ON),);// An action response that opens a link in full screen and// requires no action when closed.constactionResponse=CardService.newActionResponseBuilder().setOpenLink(CardService.newOpenLink().setUrl('https://www.google.com').setOpenAs(CardService.OpenAs.FULL_SIZE).setOnClose(CardService.OnClose.NOTHING),).build();
[[["易于理解","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"]],["最后更新时间 (UTC):2024-12-21。"],[[["`OpenLink` allows Google Workspace Add-ons and Google Chat apps to open specified URLs with customizable behaviors."],["Developers can set how the link opens (overlay or full-screen) and the action taken when it's closed (reload add-on or do nothing)."],["The `OpenLink` object provides methods like `setOnClose`, `setOpenAs`, and `setUrl` for configuration."],["When using `setOnClose` to reload add-ons, avoid links with Cross-Origin-Opener-Policy (COOP) enabled for proper functionality."]]],[]]