W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2008

[whatwg] Issues concerning the <base> element and xml:base

From: Maciej Stachowiak <mjs@apple.com>
Date: Sun, 2 Mar 2008 13:50:09 -0800
Message-ID: <4C40D961-FED9-47A5-9833-96E685609CCA@apple.com>

On Mar 1, 2008, at 10:31 PM, L. David Baron wrote:

> On Saturday 2008-03-01 19:53 -0800, Maciej Stachowiak wrote:
>> Dynamically changing <base> is a highly unlikely edge case anyway. If
>> behavior for this case really needs to be specified in detail, then  
>> I think
>> efficient and readily implementable behavior in the common case is  
>> more
>> important than getting this relatively small detail right for the
> Agreed.  However, moving nodes between documents (with different
> base URLs) is less of an edge case, and you probably need code that
> does pretty much the same thing around to handle that, at which
> point it ought to become easy to handle dynamically changing <base>.

Moving nodes between documents is not allowed by the DOM. Technically  
you are supposed to use importNode, which makes a copy. Firefox  
currently allows it in some cases, and Safari does too in a possibly  
different subset of cases for compatibility with the Firefox behavior  
on some "enterprise" web apps. It is also not a common practice, so  
far as I know. Given fixes to one or two key apps that are popular in  
intranet deployment, this extension could probably be removed.

Thus, I'm not sure it is necessary for nodes that are allowed to be  
inserted into different documents to have any special different  
behavior than they would when removed from and then reinserted into  
the same document. We certainly didn't do anything special when  
implementing our version of the implicit cross-document adoption quirk  
and are not aware of problems. In fact, the one case where we found it  
matters it only seemed to be essential for <option> elements freshly  
created with 'new Option'.

Received on Sunday, 2 March 2008 13:50:09 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:40 UTC