[Laszlo-user] what does 'this' refer to inside a function?
P T Withington
ptw at openlaszlo.org
Wed Jun 14 10:42:28 EDT 2006
On 2006-06-14, at 10:04 EDT, Neil Mix wrote:
>
>> I'm surprised there was not a warning that `parent` was undefined.
>> But maybe there is a global named `parent`.
>
> There is -- it's a reference to the window object that contains
> this window. For example, if we're code that's running within an
> IFrame, 'parent' refers to the window object that embeds our
> containing IFrame. If we're in the 'top' window, parent ==
> window. So there's always a global value for 'parent'.
That's true in the DOM (and would be true in the dhtml runtime), but
Sarah was talking about SWF. I don't think there is a global parent
in SWF, although it is plausible that somewhere in the app she was
debugging a global parent was defined...
More information about the Laszlo-user
mailing list