W3C home > Mailing lists > Public > public-html@w3.org > May 2008

Re: Working on IE's Operation Aborted problems...

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Fri, 23 May 2008 22:39:00 +0200
Message-ID: <48372B64.50007@lachy.id.au>
To: Travis Leithead <travil@windows.microsoft.com>
Cc: "public-html@w3.org" <public-html@w3.org>, Ian Hickson <ian@hixie.ch>, Harley Rosnow <Harley.Rosnow@microsoft.com>, Chris Wilson <Chris.Wilson@microsoft.com>

Travis Leithead wrote:
> You may recall I posted about Operation Aborted last month [1], and 
> I'm now looking at providing what we're calling the "full fix" for 
> the problem. The trouble is, given our current architecture, we're 
> just a little puzzled how to correctly implement the change.
> 
> In our quest to find the "right" way to handle this error condition, 
> I did a relatively quick deep-dive into section 8.2 of HTML5 to try 
> to find if these cases are spec'd somewhere therein (I believe they 
> should be), but came up empty-handed...
> 
> [1]
> http://blogs.msdn.com/ie/archive/2008/04/23/what-happened-to-operation-aborted.aspx

The way the spec works is by maintaining a stack of open elements [1], 
which is entirely independently from the DOM.  Since new nodes are 
always appended to the 'current node' (the bottommost node of the stack) 
(except in the case of the adoption agency algorithm [2]), it really 
doesn't matter what happens to those elements DOM.

There's a paragraph at the end of section 8.2.3.2 that sates:

"Nothing happens if at any time any of the elements in the stack of open 
elements are moved to a new location in, or removed from, the Document 
tree. In particular, the stack is not changed in this situation. This 
can cause, amongst other strange effects, content to be appended to 
nodes that are no longer in the DOM."

 From reading your article, it seems to me that you are effectively 
using the DOM itself as the equivalent of the stack of open elements, 
which leads you to the trouble you have when the DOM is modified.

[1] http://www.whatwg.org/specs/web-apps/current-work/#the-stack
[2] http://www.whatwg.org/specs/web-apps/current-work/#adoptionAgency

-- 
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/
Received on Friday, 23 May 2008 20:39:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:17 GMT