Recently I've been working with iframe messaging. The postMessage
solution has a lot of advantages and good traction across iframes,
WebWorkers, and browser extensions, with lots of overlap with Web
Sockets.
However the technology has two significant problems. First is the
"contentWindow that is
On 2/9/12 1:15 PM, John J Barton wrote:
This leads developers to look for events that will tell them about
'load' on iframes, and that leads them to try
iframe.contentWindow.addEventListener(). It works fine for same-domain
iframes, but fails for cross-domain.
Adding a load listener to the ifra
On Thu, Feb 9, 2012 at 11:49 AM, Boris Zbarsky wrote:
> On 2/9/12 1:15 PM, John J Barton wrote:
>>
>> This leads developers to look for events that will tell them about
>> 'load' on iframes, and that leads them to try
>> iframe.contentWindow.addEventListener(). It works fine for same-domain
>> ifr
On Thu, Feb 9, 2012 at 11:49 AM, Boris Zbarsky wrote:
> That doesn't help with the second problem, of course
Ok here are some ideas, riffing off the web messaging doc
1 To iframe element add:
readonly attribute MessagePort port;
'message' events from the iframe to the containing window
On Thu, 9 Feb 2012, John J Barton wrote:
>
> However the solution has two significant problems:
> 1. There is no way to know if portToOtherWindow is connected before
> you issue postMessage()
Just have the target message you when it's ready.
> 2. All iframes send messages to the same "handl
On Thu, Feb 9, 2012 at 4:42 PM, Ian Hickson wrote:
> On Thu, 9 Feb 2012, John J Barton wrote:
>>
>> However the solution has two significant problems:
>> 1. There is no way to know if portToOtherWindow is connected before
>> you issue postMessage()
>
> Just have the target message you when it's
On Thu, 9 Feb 2012, John J Barton wrote:
> On Thu, Feb 9, 2012 at 4:42 PM, Ian Hickson wrote:
> > On Thu, 9 Feb 2012, John J Barton wrote:
> >>
> >> However the solution has two significant problems:
> >> 1. There is no way to know if portToOtherWindow is connected before
> >> you issue postMess
On Thu, Feb 9, 2012 at 11:53 PM, Ian Hickson wrote:
> On Thu, 9 Feb 2012, John J Barton wrote:
>> On Thu, Feb 9, 2012 at 4:42 PM, Ian Hickson wrote:
>> > On Thu, 9 Feb 2012, John J Barton wrote:
>> >>
>> >> However the solution has two significant problems:
>> >> 1. There is no way to know if p
On Fri, 10 Feb 2012, John J Barton wrote:
> >
> > What I meant was just to do this on the receiving side (inside the
> > iframe), after the onmessage handler has been set up (which we are
> > assuming happens after the 'load' event for some reason):
> >
> > parent.postMessage('load', '*');
> >
On Fri, Feb 10, 2012 at 10:58 AM, Ian Hickson wrote:
> On Fri, 10 Feb 2012, John J Barton wrote:
>>
>> Just to clarify, I want to see the layer you just outlined be standard
>> so we can design iframe components and apps to mix and match. This can
>> be two simple layers on the current messaging:
On Fri, 10 Feb 2012, John J Barton wrote:
> On Fri, Feb 10, 2012 at 10:58 AM, Ian Hickson wrote:
> > On Fri, 10 Feb 2012, John J Barton wrote:
> >>
> >> Just to clarify, I want to see the layer you just outlined be
> >> standard so we can design iframe components and apps to mix and
> >> match.
On Fri, Feb 10, 2012 at 10:58 AM, Ian Hickson wrote:
> On Fri, 10 Feb 2012, John J Barton wrote:
>> >
>> > What I meant was just to do this on the receiving side (inside the
>> > iframe), after the onmessage handler has been set up (which we are
>> > assuming happens after the 'load' event for som
On Fri, 10 Feb 2012, John J Barton wrote:
>
> I think there are two more cases. Because the messages are all async,
> the 'it gets missed case" can be "it gets delayed". That causes
> additional messages.
>
> - parent opens iframe, then sets up communications, iframe is quicker:
>- iframe
On Fri, Feb 10, 2012 at 1:37 PM, Ian Hickson wrote:
> On Fri, 10 Feb 2012, John J Barton wrote:
>> On Fri, Feb 10, 2012 at 10:58 AM, Ian Hickson wrote:
>> > On Fri, 10 Feb 2012, John J Barton wrote:
>> >>
>> >> Just to clarify, I want to see the layer you just outlined be
>> >> standard so we can
On 2/10/2012 3:44 PM, John J Barton wrote:
Thanks. As a hint for the next person, it seems like the asymmetric
messages (parent 'ping', iframe 'load') is easier than symmetric
('hello'/'ack')
I think there are two more cases. Because the messages are all async,
the 'it gets missed case" can be "
On Fri, 10 Feb 2012, John J Barton wrote:
> >
> > Why would the connectivity part of this be the hard part?
>
> Because the existing information on cross-domain iframe communications
> is incomplete and written in terms few Web app developers understand,
> the browser implementations are new and
On Mon, Feb 13, 2012 at 12:57 PM, Ian Hickson wrote:
> On Fri, 10 Feb 2012, John J Barton wrote:
>> >
>> > Why would the connectivity part of this be the hard part?
>>
>> Because the existing information on cross-domain iframe communications
>> is incomplete and written in terms few Web app develo
17 matches
Mail list logo