<div>Case #1:</div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div>var f = document.createElement("iframe");</div><div>f.src = "<a href="http://foo.com/">http://foo.com/</a>";</div>
<div>document.body.appendChild(f);</div></blockquote><div><br></div><div><br></div><div>Case #2:</div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div>
<div>var f = document.createElement("iframe");</div></div><div><div>document.body.appendChild(f);</div></div><div><div>f.src = "<a href="http://foo.com/">http://foo.com/</a>";</div></div></blockquote><div>
<br></div><div>My interpretation of section 4.8.2 is that in case #1 the iframe should be navigated with replacment enabled, and in case #2 the iframe should be navigated without replacement enabled.</div><div><br></div><div>
I am basing that on the following passage:</div><div><br></div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
"Furthermore, if the process the iframe attributes algorithm was invoked for the first time for this element (i.e. as a result of the element being inserted into a document), then any navigation required of the user agent in that algorithm must be completed with replacement enabled."</blockquote>
<div><br></div><div>That passage only specifies that in case #1 the navigation be completed with replacement enabled.  It does not apply to the assignment of src in case #2.  I assume that means that the spec would have the frame navigated without replacement enabled.</div>
<div><br></div><div>I raise this issue because I observe that Firefox and IE treat case #1 and #2 the same with respect to whether or not replacement is enabled.  They enable it for both navigations to <a href="http://foo.com/">http://foo.com/</a>.  WebKit based browsers (the latest stable Chrome and Safari) also happen to agree, but that's because they always navigate with replacement enabled when the src attribute is set, which is a bug.  WebKit nightlies behave differently, and that is how I stumbled upon this issue.</div>
<div><br></div><div>I believe the spec for "src" assignment should match the spec for location.assign:</div><div><br></div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
When the assign(url) method is invoked, the UA must resolve the argument, relative to the entry script's base URL, and if that is successful, must navigate the browsing context to the specified url. <b>If the browsing context's session history contains only one Document, and that was the about:blank Document created when the browsing context was created, then the navigation must be done with replacement enabled.</b></blockquote>
<div><br></div><div>Agreed?</div><div>-Darin</div>