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

Device.openURL

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

功能说明

在设备的默认浏览器或相关应用中打开指定的 URL。

类型

Device.openURL(url: string): Promise<void>;

Params

这是要打开的 URL。

Response

无。

示例代码

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

document.getElementById("open-link").addEventListener("click", () => {
  Device.openURL("https://google.com");
});

这有帮助吗?