On May 29, 6:12 am, Matt Foster <[email protected]> wrote:
> > The iframe element doesn't support any events[1].
>
> You can indeed listen to the load event directly from the IFrame
> element.http://pastie.org/493154

I didn't say you can't, I was pointing out that the specification
doesn't require it.  Various elements are specified as supporting the
load event, iFrame isn't one of them.

There are the following reasons why that is so:

1. iFrames are to some extent a replacement for FRAMESET elements,
which are specified as supporting the onload attribute
2. iFrames have their own window object and the window object has
historically supported the load event, so iFrames also generally
support the load event

Strictly, the onload listener should be on the iFrame's body element.
Putting it on the iFrame itself will be OK in most desktop browsers,
however given the rise of mobile browsers it may pay to follow the
standard as closely as is reasonable.


> > The document that it contains may support various events (such as load, 
> > click, etc.).
>
> Why would a document inside an iframe not support these events?

Who knows?  One reason may be that the authors of the user agent
processing the markup did not program it to have that functionality.


--
Rob

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to