소개


위젯과 관련된 속성 값을 조회 할 수 있습니다.

🔒 아이콘이 있는 필드는 수정이 불가능한 읽기 전용 필드입니다.

이름 설명
🔒 id 위젯의 id 값을 가져옵니다.

📚 API 설명 및 예제

id


<aside> ▶️ widget.id

</aside>

위젯의 아이디 값을 가져옵니다.

예제

위젯 아이디 값 출력해보기

sample.html

Untitled

let _widget = null;
// q 키를 누르면 동작하는 함수
// [**App.addOnKeyDown 설명(링크)**](<https://teamzep.notion.site/Callbacks-669c6883d00c4ab4b0e2ea3bfe800432>)
App.addOnKeyDown(81, function (player) {
	_widget = player.showWidget("sample.html","top",300,300);
	App.sayToAll(`위젯 아이디: ${_widget.id}`)
});

<aside> ⬅️ ScriptWidget

</aside>

<aside> ➡️ Event Listeners

</aside>