W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2013

Re: [whatwg] Form-associated elements and the parser

From: Ryosuke Niwa <rniwa@apple.com>
Date: Tue, 06 Aug 2013 16:09:00 -0700
Message-id: <B168D49A-F23C-462C-91F8-E5CE8D11AE19@apple.com>
To: Adam Klein <adamk@chromium.org>
Cc: Kent Tamura <tkent@chromium.org>, WHATWG List <whatwg@whatwg.org>

On Aug 6, 2013, at 2:01 PM, Adam Klein <adamk@chromium.org> wrote:

> Hixie opened my eyes last week to parser-association behavior of the
> sort found at http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=2428.
> In that case, an <input> in a detached tree is associated with a
> <form> in the main document. This causes badness in WebKit and Blink
> because the association between the <form> and the <input> (e.g., as
> exposed in the HTMLFormElement.elements collection) is only weakly
> held to avoid reference loops (and thus memory leaks). And that
> weakness occasionally results in crashes when one of these objects is
> collected before the other.
> 
> While all modern HTML parser implementations I tested seemed to agree
> on their treatment of the above example (they all return "1" as
> elements.length), this feature doesn't strike me as terribly useful.
> And for what it's worth, it doesn't seem to be present in legacy IE.

What is the behavior of the old IE?

- R. Niwa
Received on Tuesday, 6 August 2013 23:09:31 UTC

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