Created
May 4, 2012 06:57
-
-
Save anchan828/2592717 to your computer and use it in GitHub Desktop.
NaClのpostMessageをWebPlayerのSendMessageっぽく
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function GetUnity() { | |
return document.getElementById("UnityEmbed") | |
} | |
function SendMessage(name, method, parameter) { | |
GetUnity().postMessage(name + "." + method + "(" + parameter + ")") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment