[whatwg] HTMLness bit on script-created documents
Olli.Pettay at helsinki.fi
Thu Oct 8 07:34:45 PDT 2009
On 10/8/09 5:01 PM, Maciej Stachowiak wrote:
> On Oct 8, 2009, at 4:37 AM, Henri Sivonen wrote:
>> In reference to https://bugzilla.mozilla.org/show_bug.cgi?id=520969:
>> Gecko currently looks at the doctype passed to createDocument() in
>> order to decide what interfaces to offer on the returned document and
>> in order to determine if the HTMLness bit gets set. This behavior was
>> added for Acid3 https://bugzilla.mozilla.org/show_bug.cgi?id=450160
>> and is endorsed by a "may" statement in DOM Level 3 Core:
>> WebKit and Opera don't implement this behavior and always return a
>> Document that doesn't have the HTMLness bit set.
> This implies that it's not necessary to ever set the HTMLness bit from
> createDocument to pass Acid3.
The HTMLness wasn't implemented because of ACID3. It was implemented
because it was wanted that .createDocument() could return documents
which might get created in other ways too (like loading a page).
So it is possible to create svg/html/xhtml/etc documents.
Of course this all would get simpler if HTML5's proposal to make
all documents to implement all interfaces was implemented.
But there is still the 'whether or not to set HTMLness flag' issue.
More information about the whatwg