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");
});도움이 되었나요?