W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2008

[whatwg] Methods defined for one document called after that document is no longer the one being displayed

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 5 Aug 2008 08:43:05 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0808050835100.5136@hixie.dreamhostps.com>
On Tue, 5 Aug 2008, Aaron Boodman wrote:
> On Tue, Aug 5, 2008 at 1:12 AM, Ian Hickson <ian at hixie.ch> wrote:
> > Right now, if you navigate an iframe to a document, and take a
> > reference to a method defined in that document, and then navigate that
> > iframe to another document, and then call the method, browsers differ in
> > what they do.
> By 'method' do you mean any function object, defined anywhere in that 
> window? For example, does document.getElementById count? Does the foo in 
> var myglobal = {foo:function(){...}}; ? What about getters?

I think I mean any function object, including getters and setters defined 
by the script (i.e. not host objects). But I haven't checked. Possibly any 
code whose global object is that global object.

> >  - In one browser, the method call fails, saying that methods can't be
> >   called while the document that defined them isn't the active document
> >   of the browsing context whose global object is the method's.
> Off the cuff, this behavior seems good to me. I think it would be good
> if this applied to any function or getter.


Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 5 August 2008 01:43:05 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:04 UTC