Skip to content

Commit

Permalink
modified ts specific
Browse files Browse the repository at this point in the history
  • Loading branch information
SridharaQweebi committed Dec 17, 2024
1 parent c66a76e commit 7bb78b1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sim/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ namespace pxsim.hare {

namespace pxsim.unity {
export function logHello(){
window.parent.sendMessage(
`SEND_MIXPANEL_EVENT:BtnClickBrowserVideoPlayerClose:VideoId:xx:Timestamp:12`
);
if (window.parent && typeof window.parent['sendMessage'] === "function") {
window.parent['sendMessage'](`SEND_MIXPANEL_EVENT:BtnClickBrowserVideoPlayerClose:VideoId:xx:Timestamp:12`)
} else {
console.error("Parent function is not available.");
}
}
}

Expand Down

0 comments on commit 7bb78b1

Please sign in to comment.