[whatwg] AppCache and javascript url question?

These src srcript urls execute in the global context of the newly
instantiated (and empty) iframes. In that context, 'parent' refers to
the containing page, so these script urls invoke the scripts defined
in the global scope if the page shown above (its a cross-frame script
invocation).

I think the spec calls for these frames to not be associated with any
appcache at the moment, but that seems questionable to me. The author
will probably expect these frames (with 'dymanically' generated
documents) to be associated with the appcache of the document doing
the generating.

Another way to phrase the question. Suppose image.png is in
myManifestFile, should that appcached resource be loaded into the
child frame1 given the html above?


On Fri, Jun 5, 2009 at 1:14 AM, Kristof
Zelechovski<giecrilj at stegny.2a.pl> wrote:
> <iframe name="frame1" src="javascript:parent.frameContents1()">
>
> The parent of what? ?The code executes in the global context, doesn?t it?
>
> Chris
>
>
>
> ________________________________
>
> From: whatwg-bounces at lists.whatwg.org
> [mailto:whatwg-bounces at lists.whatwg.org] On Behalf Of Michael Nordman
> Sent: Friday, June 05, 2009 2:45 AM
> To: WHATWG List
> Subject: [whatwg] AppCache and javascript url question?
>
>
>
> What appcache (if any) should the resulting iframes be associated with? I
> think per the spec, the answer is none. Is that the correct answer?
>
>
>
> <html manifest='myManifestFile'>
>
> <body>
>
> <script language="JavaScript">
>
> ??function frameContents1()
>
> ??{
>
> ?? ?var doc = frame1.document;
>
> ?? ?doc.open();
>
> ?? ?doc.write('<img src=image.png>');
>
> ?? ?doc.close();
>
> ?? ?return;
>
> ??}
>
>
>
> ??function frameContents2()
>
> ??{
>
> ?? ?return "hello";
>
> ??}
>
> </script>
>
>
>
> <iframe name="frame1" src="javascript:parent.frameContents1()">
>
> <iframe name="frame2" src="javascript:parent.frameContents2()">
>
> </body>
>
> </html>
>
>

Received on Friday, 5 June 2009 08:09:35 UTC