For the complete documentation index, see llms.txt. This page is also available as Markdown.

Screen.close

函数式 API closeView也可以通过它使用相同的功能。

功能说明

关闭当前屏幕。例如,可在通过“关闭”按钮结束服务时使用。

类型

Screen.close(): Promise<void>;

Params

无。

Response

无。

示例代码

import { Screen } from "@apps-in-toss/web-framework";

const closeButton = document.querySelector("#close-button");

closeButton.addEventListener("click", async () => {
  await Screen.close();
});

这有帮助吗?