Skip to content

Commit

Permalink
Remove Goals and redo Historical section
Browse files Browse the repository at this point in the history
Now that the relevant W3C documents redirect here, there is no need to explain the differences with them. The Historical section now details what has been removed, without acknowledging the historical organization of those features.
  • Loading branch information
annevk authored Nov 9, 2020
1 parent 0de5ae3 commit 66d6037
Showing 1 changed file with 51 additions and 138 deletions.
189 changes: 51 additions & 138 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -49,43 +49,6 @@ spec:html; type:element



<h2 id=goals class=no-num>Goals</h2>

This specification standardizes the DOM. It does so as follows:

<ol>
<li>
<p>By consolidating <cite>DOM Level 3 Core</cite> [[DOM-Level-3-Core]],
<cite>Element Traversal</cite> [[ELEMENTTRAVERSAL]],
<cite>Selectors API Level 2</cite> [[SELECTORS-API2]], the
"DOM Event Architecture" and "Basic Event Interfaces" chapters of
<cite>DOM Level 3 Events</cite> [[uievents-20031107]] (specific types of events do not
belong in the DOM Standard), and <cite>DOM Level 2 Traversal and Range</cite>
[[DOM-Level-2-Traversal-Range]], and:

<ul class=brief>
<li>Aligning them with the JavaScript ecosystem where possible.
<li>Aligning them with existing implementations.
<li>Simplifying them as much as possible.
</ul>

<li><p>By moving features from the HTML Standard [[!HTML]] that make more sense to be
specified as part of the DOM Standard.

<li>
<p>By defining a replacement for the "Mutation Events" and
"Mutation Name Event Types" chapters of <cite>DOM Level 3 Events</cite>
[[uievents-20031107]] as the old model
was problematic.

<p class="note no-backref">The old model is expected to be removed from implementations
in due course.

<li><p>By defining new features that simplify common DOM operations.
</ol>



<h2 id=infrastructure oldids=terminology,dependencies>Infrastructure</h2>

<p>This specification depends on the Infra Standard. [[!INFRA]]
Expand Down Expand Up @@ -417,7 +380,7 @@ interface Event {

readonly attribute DOMString type;
readonly attribute EventTarget? target;
readonly attribute EventTarget? srcElement; // historical
readonly attribute EventTarget? srcElement; // legacy
readonly attribute EventTarget? currentTarget;
sequence&lt;EventTarget> composedPath();

Expand All @@ -428,20 +391,20 @@ interface Event {
readonly attribute unsigned short eventPhase;

undefined stopPropagation();
attribute boolean cancelBubble; // historical alias of .stopPropagation
attribute boolean cancelBubble; // legacy alias of .stopPropagation()
undefined stopImmediatePropagation();

readonly attribute boolean bubbles;
readonly attribute boolean cancelable;
attribute boolean returnValue; // historical
attribute boolean returnValue; // legacy
undefined preventDefault();
readonly attribute boolean defaultPrevented;
readonly attribute boolean composed;

[LegacyUnforgeable] readonly attribute boolean isTrusted;
readonly attribute DOMHighResTimeStamp timeStamp;

undefined initEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false); // historical
undefined initEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false); // legacy
};

dictionary EventInit {
Expand Down Expand Up @@ -809,7 +772,7 @@ incapable of setting {{Event/composed}}. It has to be supported for legacy conte

<pre class=idl>
partial interface Window {
[Replaceable] readonly attribute any event; // historical
[Replaceable] readonly attribute any event; // legacy
};
</pre>

Expand All @@ -833,7 +796,7 @@ interface CustomEvent : Event {

readonly attribute any detail;

undefined initCustomEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, optional any detail = null); // historical
undefined initCustomEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, optional any detail = null); // legacy
};

dictionary CustomEventInit : EventInit {
Expand Down Expand Up @@ -3711,14 +3674,14 @@ interface Node : EventTarget {
const unsigned short ATTRIBUTE_NODE = 2;
const unsigned short TEXT_NODE = 3;
const unsigned short CDATA_SECTION_NODE = 4;
const unsigned short ENTITY_REFERENCE_NODE = 5; // historical
const unsigned short ENTITY_NODE = 6; // historical
const unsigned short ENTITY_REFERENCE_NODE = 5; // legacy
const unsigned short ENTITY_NODE = 6; // legacy
const unsigned short PROCESSING_INSTRUCTION_NODE = 7;
const unsigned short COMMENT_NODE = 8;
const unsigned short DOCUMENT_NODE = 9;
const unsigned short DOCUMENT_TYPE_NODE = 10;
const unsigned short DOCUMENT_FRAGMENT_NODE = 11;
const unsigned short NOTATION_NODE = 12; // historical
const unsigned short NOTATION_NODE = 12; // legacy
readonly attribute unsigned short nodeType;
readonly attribute DOMString nodeName;

Expand All @@ -3742,7 +3705,7 @@ interface Node : EventTarget {

[CEReactions, NewObject] Node cloneNode(optional boolean deep = false);
boolean isEqualNode(Node? otherNode);
boolean isSameNode(Node? otherNode); // historical alias of ===
boolean isSameNode(Node? otherNode); // legacy alias of ===

const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01;
const unsigned short DOCUMENT_POSITION_PRECEDING = 0x02;
Expand Down Expand Up @@ -4769,8 +4732,8 @@ interface Document : Node {
readonly attribute USVString documentURI;
readonly attribute DOMString compatMode;
readonly attribute DOMString characterSet;
readonly attribute DOMString charset; // historical alias of .characterSet
readonly attribute DOMString inputEncoding; // historical alias of .characterSet
readonly attribute DOMString charset; // legacy alias of .characterSet
readonly attribute DOMString inputEncoding; // legacy alias of .characterSet
readonly attribute DOMString contentType;

readonly attribute DocumentType? doctype;
Expand All @@ -4793,7 +4756,7 @@ interface Document : Node {
[NewObject] Attr createAttribute(DOMString localName);
[NewObject] Attr createAttributeNS(DOMString? namespace, DOMString qualifiedName);

[NewObject] Event createEvent(DOMString interface); // historical
[NewObject] Event createEvent(DOMString interface); // legacy

[NewObject] Range createRange();

Expand Down Expand Up @@ -5851,14 +5814,14 @@ interface Element : Node {

Element? closest(DOMString selectors);
boolean matches(DOMString selectors);
boolean webkitMatchesSelector(DOMString selectors); // historical alias of .matches
boolean webkitMatchesSelector(DOMString selectors); // legacy alias of .matches

HTMLCollection getElementsByTagName(DOMString qualifiedName);
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
HTMLCollection getElementsByClassName(DOMString classNames);

[CEReactions] Element? insertAdjacentElement(DOMString where, Element element); // historical
undefined insertAdjacentText(DOMString where, DOMString data); // historical
[CEReactions] Element? insertAdjacentElement(DOMString where, Element element); // legacy
undefined insertAdjacentText(DOMString where, DOMString data); // legacy
};

dictionary ShadowRootInit {
Expand Down Expand Up @@ -9455,14 +9418,14 @@ callback interface NodeFilter {
const unsigned long SHOW_ATTRIBUTE = 0x2;
const unsigned long SHOW_TEXT = 0x4;
const unsigned long SHOW_CDATA_SECTION = 0x8;
const unsigned long SHOW_ENTITY_REFERENCE = 0x10; // historical
const unsigned long SHOW_ENTITY = 0x20; // historical
const unsigned long SHOW_ENTITY_REFERENCE = 0x10; // legacy
const unsigned long SHOW_ENTITY = 0x20; // legacy
const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x40;
const unsigned long SHOW_COMMENT = 0x80;
const unsigned long SHOW_DOCUMENT = 0x100;
const unsigned long SHOW_DOCUMENT_TYPE = 0x200;
const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x400;
const unsigned long SHOW_NOTATION = 0x800; // historical
const unsigned long SHOW_NOTATION = 0x800; // legacy

unsigned short acceptNode(Node node);
};
Expand Down Expand Up @@ -9877,47 +9840,9 @@ methods on {{Document}}.

<h2 id=historical>Historical</h2>

<p>As explained in <a href="#goals">goals</a> this standard is a significant revision of various
obsolete DOM specifications. This section enumerates the incompatible changes.


<h3 id=dom-events-changes>DOM Events</h3>
<p>This standard used to contain several interfaces and interface members that have been removed.

<p>These are the changes made to the features described in the "DOM Event Architecture",
"Basic Event Interfaces", "Mutation Events", and "Mutation Name Event Types" chapters of
<cite>DOM Level 3 Events</cite>. The other chapters are defined by the <cite>UI Events</cite>
specification. [[!UIEVENTS]]

<ul class=brief>
<li>Removes <dfn interface>MutationEvent</dfn> and <dfn interface>MutationNameEvent</dfn>.
<li>Fire is no longer synonymous with dispatch, but includes initializing an event.
<li>The propagation and canceled flags are unset when invoking {{Event/initEvent()}} rather than
after dispatch.
<li>{{Event}}'s {{Event/timeStamp}} attribute is a {{DOMHighResTimeStamp}} rather than a
{{DOMTimeStamp}}.
</ul>


<h3 id=dom-core-changes>DOM Core</h3>

<p>These are the changes made to the features described in <cite>DOM Level 3 Core</cite>.

<p>{{DOMString}}, {{DOMException}}, and {{DOMTimeStamp}} are now defined in Web IDL.

<p id=domstringlist>{{DOMStringList}} is now defined in HTML.

<p><dfn method for=Node><code>hasAttributes()</code></dfn> and
<dfn attribute for=Node><code>attributes</code></dfn> moved from {{Node}} to {{Element}}.

<p><dfn attribute for=Node><code>namespaceURI</code></dfn>,
<dfn attribute for=Node><code>prefix</code></dfn>, and
<dfn attribute for=Node><code>localName</code></dfn> moved from {{Node}} to {{Element}} and
{{Attr}}.

<p>The remainder of interfaces and interface members listed in this section were removed to simplify
the web platform. Implementations conforming to this specification will not support them.

<p>Interfaces:
<p>These interfaces have been removed:

<ul class=brief dfn-type="interface">
<li><dfn><code>DOMConfiguration</code></dfn>
Expand All @@ -9930,22 +9855,23 @@ the web platform. Implementations conforming to this specification will not supp
<li><dfn><code>DOMUserData</code></dfn>
<li><dfn><code>Entity</code></dfn>
<li><dfn><code>EntityReference</code></dfn>
<li><dfn><code>MutationEvent</code></dfn>
<li><dfn><code>MutationNameEvent</code></dfn>
<li><dfn><code>NameList</code></dfn>
<li><dfn><code>Notation</code></dfn>
<li><dfn><code>RangeException</code></dfn>
<li><dfn><code>TypeInfo</code></dfn>
<li><dfn><code>UserDataHandler</code></dfn>
</ul>

<p>Interface members:
<p>And these interface members have been removed:

<dl>
<dt>{{Node}}
<dt>{{Attr}}
<dd>
<ul class=brief>
<li><dfn attribute for=Node><code>isSupported</code></dfn>
<li><dfn method for=Node><code>getFeature()</code></dfn>
<li><dfn method for=Node><code>getUserData()</code></dfn>
<li><dfn method for=Node><code>setUserData()</code></dfn>
<li><dfn attribute for=Attr><code>schemaTypeInfo</code></dfn>
<li><dfn attribute for=Attr><code>isId</code></dfn>
</ul>

<dt>{{Document}}
Expand All @@ -9961,17 +9887,18 @@ the web platform. Implementations conforming to this specification will not supp
<li><dfn method for=Document><code>renameNode()</code></dfn>
</ul>

<dt>{{DOMImplementation}}
<dt>{{DocumentType}}
<dd>
<ul class=brief>
<li><dfn method for=DOMImplementation><code>getFeature()</code></dfn>
<li><dfn attribute for=DocumentType><code>entities</code></dfn>
<li><dfn attribute for=DocumentType><code>notations</code></dfn>
<li><dfn attribute for=DocumentType><code>internalSubset</code></dfn>
</ul>

<dt>{{Attr}}
<dt>{{DOMImplementation}}
<dd>
<ul class=brief>
<li><dfn attribute for=Attr><code>schemaTypeInfo</code></dfn>
<li><dfn attribute for=Attr><code>isId</code></dfn>
<li><dfn method for=DOMImplementation><code>getFeature()</code></dfn>
</ul>

<dt>{{Element}}
Expand All @@ -9983,12 +9910,19 @@ the web platform. Implementations conforming to this specification will not supp
<li><dfn method for=Element><code>setIdAttributeNode()</code></dfn>
</ul>

<dt>{{DocumentType}}
<dt>{{Node}}
<dd>
<ul class=brief>
<li><dfn attribute for=DocumentType><code>entities</code></dfn>
<li><dfn attribute for=DocumentType><code>notations</code></dfn>
<li><dfn attribute for=DocumentType><code>internalSubset</code></dfn>
<li><dfn attribute for=Node><code>isSupported</code></dfn>
<li><dfn method for=Node><code>getFeature()</code></dfn>
<li><dfn method for=Node><code>getUserData()</code></dfn>
<li><dfn method for=Node><code>setUserData()</code></dfn>
</ul>

<dt>{{NodeIterator}}
<dd>
<ul class=brief>
<li><dfn for=NodeIterator attribute>expandEntityReferences</dfn>
</ul>

<dt>{{Text}}
Expand All @@ -9997,34 +9931,13 @@ the web platform. Implementations conforming to this specification will not supp
<li><dfn attribute for=Text><code>isElementContentWhitespace</code></dfn>
<li><dfn method for=Text><code>replaceWholeText()</code></dfn>
</ul>
</dl>


<h3 id=dom-ranges-changes>DOM Ranges</h3>

<p>These are the changes made to the features described in the "Document Object Model Range" chapter
of <cite>DOM Level 2 Traversal and Range</cite>.

<ul class=brief>
<li><dfn interface>RangeException</dfn> has been removed.
<li>{{Range/detach()}} is now a no-op.
</ul>


<h3 id=dom-traversal-changes>DOM Traversal</h3>

<p>These are the changes made to the features described in the "Document Object Model Traversal"
chapter of <cite>DOM Level 2 Traversal and Range</cite>.

<ul class=brief>
<li>{{createNodeIterator()}} and {{createTreeWalker()}} now have optional arguments and lack a
fourth argument which is no longer relevant given entity references never made it into the DOM.
<li>The <dfn for="NodeIterator, TreeWalker" attribute>expandEntityReferences</dfn> attribute has
been removed from the {{NodeIterator}} and {{TreeWalker}} interfaces for the aforementioned reason.
<li>{{NodeIterator/nextNode()}} and {{NodeIterator/previousNode()}} now throw when invoked from a
{{NodeFilter}} to align with user agents.
<li>{{NodeIterator/detach()}} is now a no-op.
</ul>
<dt>{{TreeWalker}}
<dd>
<ul class=brief>
<li><dfn for=TreeWalker attribute>expandEntityReferences</dfn>
</ul>
</dl>



Expand Down

0 comments on commit 66d6037

Please sign in to comment.