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

Screen.setSecure

함수형 API setSecureScreen으로도 같은 기능을 쓸 수 있어요.

기능 설명

화면 캡쳐를 차단해서 민감한 정보가 유출되지 않도록 보호하거나, 필요할 때 캡쳐를 허용해요.

enabledtrue이면 캡쳐를 차단하고, false이면 허용해요.

타입

Screen.setSecure(options: SetSecureScreenOptions): Promise<{ enabled: boolean }>;

Params

interface SetSecureScreenOptions {
  enabled: boolean;
}

Response

적용된 상태를 { enabled: boolean } 형태로 반환해요.

예시 코드

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

const secureButton = document.querySelector("#secure-button");

secureButton.addEventListener("click", async () => {
  const result = await Screen.setSecure({ enabled: true });
  console.log(result.enabled); // true
});

도움이 되었나요?