<br><br><div class="gmail_quote">On Sun, Jul 19, 2009 at 3:10 AM, Ian Hickson <span dir="ltr"><<a href="mailto:ian@hixie.ch">ian@hixie.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Wed, 1 Jul 2009, Michael Nordman wrote:<br>
> On Tue, Jun 30, 2009 at 9:29 PM, Ian Hickson <<a href="mailto:ian@hixie.ch">ian@hixie.ch</a>> wrote:<br>
> > On Thu, 4 Jun 2009, Michael Nordman wrote:<br>
> > ><br>
> > > What appcache (if any) should the resulting iframes be associated with? I<br>
> > > think per the spec, the answer is none. Is that the correct answer?<br>
> > ><br>
> > > <html manifest='myManifestFile'><br>
> > > <body><br>
> > > <script language="JavaScript"><br>
> > > function frameContents1()<br>
> > > {<br>
> > > var doc = frame1.document;<br>
> > > doc.open();<br>
> > > doc.write('<img src=image.png>');<br>
> > > doc.close();<br>
> > > return;<br>
> > > }<br>
> > ><br>
> > > function frameContents2()<br>
> > > {<br>
> > > return "hello";<br>
> > > }<br>
> > > </script><br>
> > ><br>
> > > <iframe name="frame1" src="javascript:parent.frameContents1()"><br>
> > > <iframe name="frame2" src="javascript:parent.frameContents2()"><br>
> > > </body><br>
> > > </html><br>
> ><br>
> > If there's no manifest="", there's no application cache selected, as far<br>
> > as I can tell.<br>
><br>
> Thats what it looks like to me too in the current draft. Wondering if<br>
> thats the right behavior though?<br>
><br>
> Generally when loading a frame, the appcache from which the doc resource<br>
> was loaded gets selected (augmented by an explicit manifest attribute<br>
> that can make something 'foreign').<br>
><br>
> In this case, the src is a script embedded in a page that is appcached,<br>
> so in a transitory sense the doc resource was loaded from an appcache,<br>
> but that cache does not get selected.<br>
<br>
</div></div>The doc resource was not loaded from the cache, it was loaded from<br>
evaluating JavaScript.</blockquote><div><br></div><div> The key phrase was "in a transitory sense". The script that was evaluated was loaded from an appcache.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
<div class="im"><br>
<br>
> Feels like maybe image.png should load from myManifestFile in the<br>
> sample?<br>
<br>
</div>It's trivial for the script to manually include a manifest, if that's what<br>
the script really wants to do.</blockquote><div><br></div><div>Not sure that would produce the desired result?</div><div><br></div><div>The appcache would attempt to add this javascript url as a 'master' entry. But it would be rejected since its not an http url and the cache would not be selected and its image.png would not be loaded. Right?</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
<br>
I don't think we really want to be encouraging javascript: <iframe>s,<br>
anyway.</blockquote><div><br></div><div>Very much agreed.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
<br>
Also, consider this case:<br>
<br>
<iframe src="javascript:parent.frameContents3()+frames['otherWin'].frameContents4()"><br>
<br>
...where frames['otherWin'] is from a different manifest. Now what?</blockquote><div><br></div><div>Good question.</div><div><br></div><div>Regardless of how complex the script is, there is only one document containing the javascript url. So in that transitory sense, the appcache associated with that document (in this case the one containing the <iframe> tag).</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
<div><div></div><div class="h5"><br>
--<br>
Ian Hickson U+1047E )\._.,--....,'``. fL<br>
<a href="http://ln.hixie.ch/" target="_blank">http://ln.hixie.ch/</a> U+263A /, _.. \ _\ ;`._ ,.<br>
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'<br>
</div></div></blockquote></div><br>