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

[whatwg] [html5] Attaching option elements to select elements in different documents

From: Stewart Brodie <stewart.brodie@antplc.com>
Date: Thu, 4 Mar 2010 12:05:13 +0000
Message-ID: <46f2bbccf39dedcc6259ff268c986427c9afd497@localhost>
Anne van Kesteren <annevk at opera.com> wrote:

> On Thu, 04 Mar 2010 11:27:23 +0100, Stewart Brodie  
> <stewart.brodie at antplc.com> wrote:
> > Boris Zbarsky <bzbarsky at MIT.EDU> wrote:
> >> On 3/3/10 12:11 PM, Stewart Brodie wrote:
> >> > As far as I can tell, this affects: HTMLSelectElement.add(),
> >> > HTMLOptionsCollection.add(), Node.appendChild(), Node.replaceChild(),
> >> > Node.insertBefore().
> >>
> >> Is it option-specific, though?  Last I checked, various browsers
> >> implicitly adopted on append/insert/replace, period.
> >
> > Since when?  I was sure that they didn't used to do this.  DOM Core is
> > extremely clear on this issue (both in level 2 and level 3).  You appear
> > to be correct: Firefox and Opera both just ignore the standard and get
> > this wrong.  Chrome just seems to get confused.
> 
> This changed a while ago due to compatibility problems. Consensus at the  
> time was to change DOM Core.

Is this documented anywhere?  By "compatibility problems", presumably you
mean bugs in Firefox that were then exploited by content authors who didn't
know better?   From Maciej's description of WebKit's behaviour, it looks
like either they didn't know about this consensus or they didn't implement
it compatibly.

This definitely needs to be documented in HTML5.

Are there any more retrospective changes to fundamental behaviour specified
in DOM Core in the pipeline that I need to know about?  I already know about
the one in DOM Event about capturing listeners being called in the target
phase.

That leaves the issue of how adoptNode() affects the [[Prototype]] of the
node objects, which is currently inconsistent between desktop browsers.
Opera & Chrome agree with each other (that the [[Prototype]] is unchanged);
Firefox disagrees (it changes the [[Prototype]] to be that it would have
been if the node had been created anew in the destination document).


-- 
Stewart Brodie
Team Leader - ANT Galio Browser
ANT Software Limited
Received on Thursday, 4 March 2010 04:05:13 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:21 UTC