Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use HTMLDocument where applicable #799

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ urlPrefix: https://www.w3.org/TR/xml-names/#NT-
url: https://w3c.github.io/DOM-Parsing/#dfn-createcontextualfragment-fragment
type: method; text: createContextualFragment(); for: Range
type: interface
url: https://html.spec.whatwg.org/multipage/dom.html#htmldocument
text: HTMLDocument
url: https://w3c.github.io/touch-events/#idl-def-touchevent
text: TouchEvent
url: https://w3c.github.io/deviceorientation/spec-source-orientation.html#devicemotion
Expand Down Expand Up @@ -86,9 +88,10 @@ This specification standardizes the DOM. It does so as follows:

<p>This specification depends on the Infra Standard. [[!INFRA]]

<p>Some of the terms used in this specification are defined in <cite>Encoding</cite>,
<p>Some of the terms used in this specification are defined in <cite>Encoding</cite>, <cite>HTML</cite>,
<cite>Selectors</cite>, <cite>Web IDL</cite>, <cite>XML</cite>, and <cite>Namespaces in XML</cite>.
[[!ENCODING]]
[[!HTML]]
[[!SELECTORS4]]
[[!WEBIDL]]
[[!XML]]
Expand Down Expand Up @@ -5472,7 +5475,7 @@ with that <a>document</a>.
interface DOMImplementation {
[NewObject] DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId, DOMString systemId);
[NewObject] XMLDocument createDocument(DOMString? namespace, [TreatNullAs=EmptyString] DOMString qualifiedName, optional DocumentType? doctype = null);
[NewObject] Document createHTMLDocument(optional DOMString title);
[NewObject] HTMLDocument createHTMLDocument(optional DOMString title);

boolean hasFeature(); // useless; always returns true
};
Expand All @@ -5493,7 +5496,7 @@ interface DOMImplementation {
<dt><code><var>doc</var> = <var>document</var> . {{Document/implementation}} . <a method for=DOMImplementation lt=createDocument()>createDocument(<var>namespace</var>, <var>qualifiedName</var> [, <var>doctype</var> = null])</a></code>

<dd>
Returns an {{XMLDocument}}, with a
Returns an {{XMLDocument}} object, with a
<a>document element</a> whose
<a for=Element>local name</a> is
<var>qualifiedName</var> and whose
Expand All @@ -5508,7 +5511,7 @@ interface DOMImplementation {
<dt><code><var>doc</var> = <var>document</var> . {{Document/implementation}} . <a method for=DOMImplementation lt=createHTMLDocument()>createHTMLDocument([<var>title</var>])</a></code>

<dd>
Returns a <a>document</a>, with a basic
Returns an {{HTMLDocument}} object, with a basic
<a>tree</a> already constructed including a
<{title}> element, unless the <var>title</var>
argument is omitted.
Expand Down Expand Up @@ -5538,7 +5541,7 @@ method, when invoked, must run these steps:
method, when invoked, must run these steps:

<ol>
<li><p>Let <var>document</var> be a new {{XMLDocument}}.
<li><p>Let <var>document</var> be a new {{XMLDocument}} object.

<li><p>Let <var>element</var> be null.

Expand Down Expand Up @@ -5575,7 +5578,7 @@ The
method, when invoked, must run these steps:

<ol>
<li><p>Let <var>doc</var> be a new <a>document</a> that is an <a>HTML document</a>.
<li><p>Let <var>doc</var> be a new {{HTMLDocument}} object.

<li><p>Set <var>doc</var>'s <a for=Document>content type</a> to "<code>text/html</code>".

Expand Down Expand Up @@ -10097,6 +10100,7 @@ Elliott Sprehn,
Emilio Cobos Álvarez,
Eric Bidelman,
Erik Arvidsson,
<i>ExE Boss</i>,
Gary Kacmarcik,
Gavin Nicol,
Giorgio Liscio,
Expand Down