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

Maciej Stachowiak mjs at apple.com
Sun Mar 2 13:50:09 PST 2008


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'.

Regards,
Maciej




More information about the whatwg mailing list