W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2007

[whatwg] Expected behaviour when a <base> is within an innerHTML fragment

From: Anne van Kesteren <annevk@opera.com>
Date: Sun, 11 Feb 2007 12:44:45 +0100
Message-ID: <op.tnk1kvyb64w2qv@id-c0020.lan>
On Sun, 11 Feb 2007 12:37:50 +0100, Jorgen Horstink  
<mail at jorgenhorstink.nl> wrote:
>> To take this from a discussion last month on atom-syntax:
>>
>> What is meant to happen if you set innerHTML of a <div> where the set  
>> value has both a <base> and an <a>?

There's an open issue on this: "Need to cope with second and subsequent  
base elements affecting subsequent elements magically."


> first of all the <base> element can only be inserted in HTML documents.  
> The spec states that there can only be one <base> element. The <base>  
> element must  be used before any elements that use relative URI's.
>
> If the insertion mode is "in body" handle the token as follows:
>        A start tag token whose tag name is one of: "base", "link",  
> "meta", "title"
>        Parse error. Process the token as if the insertion mode had been  
> "in head". [1]
>
> So inserting a <base> element in the body results in a parse error.

Well, it also tells you how to deal with this parse error.


> [1] http://www.whatwg.org/specs/web-apps/current-work/#how-to0


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Sunday, 11 February 2007 03:44:45 UTC

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