Re: Drop foster-parented stuff on the floor if parent gone

On Wed, 31 Dec 2008, Jonas Sicking wrote:
> 
> An ideal algorithm would be something like this:
> 1. Find the last table in the stack of open elements.
> 2. Find the element in the stack of open elements that is right before
> the last table in the stack of open elements. (this is generally the
> parent of the table unless the DOM has been mutated)
> 3. If an element was found in both 1 and 2, and the the table found in
> 1 is a child of the element found in 2, insert the new node before the
> table found in 1 and exit the algorithm.
> 4. If an element was found in 2, append the new node to 2 and exit the
> algorithm.
> 5. Otherwise drop the node.

Ok, I've done that instead.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Sunday, 1 February 2009 08:53:16 UTC