# 前端遊戲狀態更新事件 Event name: 'Game_State' | 事件名稱 | 描述 | |--|--| | BigWin_Start | 大獎動畫開始 | | FreeGame_Start | FreeGame開始 | | GameIdle_End | 錄影結束(送出Idel協議時發送事件) | ``` // 前端送出事件 const customEvent = new CustomEvent("Game_State", { name: "BigWin_Start" }); canvas.dispatchEvent(customEvent); ``` ``` // 訂閱事件 obj.addEventListener('Game_State', (e) => { console.log(e.name); }); ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up