Status: Unconfirmed
Owner: ----
Labels: Type-Bug Pri-2 OS-All Area-Misc

New issue 22894 by dustin.machi: postMessage, onmessage for ChromeFrame
http://code.google.com/p/chromium/issues/detail?id=22894

In attempting to use the ChromeFrame component embedded in a page, I have
been unable to make frame.postMessage().  It claims the function does not
exist.

Attempted code looks like this:

<html>
        <head>
                <title>Dojo Console Shell</title>
                <script type="text/javascript" djConfig="isDebug: 
true,popup:true,
parseOnLoad: true" src="dojotoolkit/dojo/dojo.js"></script>
        </head>
        <script type="text/javascript">
                function sendMessage(){
                        console.log("sending message");
                        var frame = dojo.byId("UI");
                        var message = dojo.byId("message").value || 
"EmptyMessage";
                        frame.postMessage(message);
                }

                dojo.addOnLoad(function(){
                        var frame = dojo.byId("UI");
                        dojo.connect(frame, "onmessage", function(){
                                console.log("got message from frame");
                        });
                });
        </script>       
        <body class="tundra">
                <input id="message" type="text" />
                <button onclick="sendMessage();">Send message to 
embedded</button>

                <h2>Chrome Frame: </h2>
                <object padding="0px" margin="0px" width="100%" height="100%"
classid="clsid:E0A900DF-9611-4446-86BD-4B1D47E7DB2A" id="UI">
                        <param name="src" value="EmbeddedTest.html" />
                </object>
        </body>
</html>

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to