- From: Nilsson, Claes1 <Claes1.Nilsson@sonyericsson.com>
- Date: Thu, 23 Feb 2012 12:48:14 +0100
- To: KOMATSU Kensaku <kensaku.komatsu@gmail.com>, Greg Billock <gbillock@google.com>
- CC: James Hawkins <jhawkins@google.com>, Paul Kinlan <paulkinlan@google.com>, "public-web-intents@w3.org" <public-web-intents@w3.org>
- Message-ID: <6DFA1B20D858A14488A66D6EEDF26AA35D65E66962@seldmbx03.corpusers.net>
Thanks for all responses on this issue. I was looking for code examples on channel messaging and found for example this: http://www.codeproject.com/Articles/248264/HTML5-WebMessaging-Experiment. Under the section "MessageChannel" a method to create a channel between a container page and an iframe page is described. Could this method be used to create a message channel between a Client web page and a Service iframe page? I haven't tried yet but the article mentions that support for channel messaging is limited in browsers. On desktop I am using Chrome but my main platform for Web Intents use cases is Android. The site http://www.html5test.com/ states that "Cross-document messaging" is supported both in Chrome and the current Android browser but does this include Channel messaging? Guess it is just to test. Regards Claes From: KOMATSU Kensaku [mailto:kensaku.komatsu@gmail.com] Sent: den 23 februari 2012 03:28 To: Greg Billock Cc: James Hawkins; Paul Kinlan; Nilsson, Claes1; public-web-intents@w3.org Subject: Re: Using HTML5 Channel Messaging with Web Intents to create persistent relations So, my understanding is that if developer wants to have persistant connection within "CURRENT" WI framework, exchanging servicer's url via postResult() and creating persistant connection with postMessage() / MessageChannel() by it (under iframe basis) will be required. Is it right? Year I agree that it seems complex procedure, But it is worth to take care of. Because it realizes user controllable Mash-up sites :) --- Ken 2012/2/23 Greg Billock <gbillock@google.com<mailto:gbillock@google.com>> I should add, though: the structured clone algorithm should take a transfer map (see [1]). Chromium's algorithm doesn't have this feature at this point yet, though. (Or maybe I'm just doing it wrong...) [1] http://dev.w3.org/html5/spec/common-dom-interfaces.html On Wed, Feb 22, 2012 at 3:02 PM, Greg Billock <gbillock@google.com<mailto:gbillock@google.com>> wrote: No. Ports aren't clone-able. :-( On Wed, Feb 22, 2012 at 11:32 AM, James Hawkins <jhawkins@google.com<mailto:jhawkins@google.com>> wrote: Greg, this works in the current implementation in Chrome, right? James On Wed, Feb 22, 2012 at 11:02 AM, Paul Kinlan <paulkinlan@google.com<mailto:paulkinlan@google.com>> wrote: Hi, At the moment, this is one of the things that doesn't work in the shim. Because the shim uses a lot of hacks to get it working in IE and FF I have had to limit some functionality. Most of this is due to the fact that data signaling is currently done via localStorage events and you can't serialize a MessagePort to a string. P On Wed, Feb 22, 2012 at 5:14 PM, Nilsson, Claes1 <Claes1.Nilsson@sonyericsson.com<mailto:Claes1.Nilsson@sonyericsson.com>> wrote: Hi, I wanted to text creating a message channel between a Client page and a Service page when running in Chrome and using the JS shim from webintents.org<http://webintents.org> but I didn't get it working. I a probably doing something stupid... The code in the Client page is: var channel = new MessageChannel(); var intent = new Intent(); intent.action = "http://webintents.org/view"; intent.type = "video/*"; intent.data = channel.port2; window.navigator.startActivity(intent, function (intentData) { alert (intentData); }); channel.port1.onmessage = function (evt) { alert (evt.data); }; The Service page code is: If (!!window.intent) { var port = intent.data; if (port) { port.start(); port.postMessage("Port received"); }, false); } However, Chrome does not recognize port as a Message port object. What's wrong. Sorry for not being very experienced with JavaScript. Claes [cid:image001.gif@01CCF224.D875E050] Claes Nilsson M.Sc.E.E Master Engineer, Research Technology Research - Advanced Application Lab Sony Ericsson Mobile Communications Phone: +46 10 80 15178<tel:%2B46%2010%2080%2015178> Mobile: +46 705 56 68 78<tel:%2B46%20705%2056%2068%2078> Switchboard: +46 10 80 00000<tel:%2B46%2010%2080%2000000> E-Mail: mailto:claes1.nilsson@sonyericsson.com Visiting Address; Nya Vattentornet SE-221 88 LUND, Sweden Disclaimer: The information in this e-mail is confidential and may be legally privileged. It is intended solely for the named recipient(s) and access to this e-mail by anyone else is unauthorized. The views are those of the sender and not necessarily the views of Sony Ericsson and Sony Ericsson accepts no responsibility or liability whatsoever or howsoever arising in connection with this e-mail.Any attachment(s) to this message has been checked for viruses, but please rely on your own virus checker and procedures. If you contact us by e-mail, we will store your name and address to facilitate communications. If you are not the intended recipient, please inform the sender by replying this transmission and delete the e-mail and any copies of it without disclosing it. -- Paul Kinlan Developer Advocate @ Google for Chrome and HTML5 G+: http://plus.ly/paul.kinlan t: +447730517944<tel:%2B447730517944> tw: @Paul_Kinlan LinkedIn: http://uk.linkedin.com/in/paulkinlan Blog: http://paul.kinlan.me Skype: paul.kinlan
Attachments
- image/gif attachment: image001.gif
Received on Thursday, 23 February 2012 11:48:45 UTC