From 8587e15d794ce60f29377db6e3acb91cd5663e3e Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Fri, 6 Nov 2020 13:49:38 +0100 Subject: [PATCH 1/5] Remove Goals and Historical sections Now that the relevant W3C documents redirect here, there is no need to explain the difference. --- dom.bs | 190 --------------------------------------------------------- 1 file changed, 190 deletions(-) diff --git a/dom.bs b/dom.bs index 8b51d9939..809a6f0bd 100644 --- a/dom.bs +++ b/dom.bs @@ -49,43 +49,6 @@ spec:html; type:element -

Goals

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

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

      -
    • Aligning them with the JavaScript ecosystem where possible. -
    • Aligning them with existing implementations. -
    • Simplifying them as much as possible. -
    - -
  2. By moving features from the HTML Standard [[!HTML]] that make more sense to be - specified as part of the DOM Standard. - -

  3. -

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

    The old model is expected to be removed from implementations - in due course. - -

  4. By defining new features that simplify common DOM operations. -

- - -

Infrastructure

This specification depends on the Infra Standard. [[!INFRA]] @@ -9875,159 +9838,6 @@ methods on {{Document}}. -

Historical

- -

As explained in goals this standard is a significant revision of various -obsolete DOM specifications. This section enumerates the incompatible changes. - - -

DOM Events

- -

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 -DOM Level 3 Events. The other chapters are defined by the UI Events -specification. [[!UIEVENTS]] - -

- - -

DOM Core

- -

These are the changes made to the features described in DOM Level 3 Core. - -

{{DOMString}}, {{DOMException}}, and {{DOMTimeStamp}} are now defined in Web IDL. - -

{{DOMStringList}} is now defined in HTML. - -

hasAttributes() and -attributes moved from {{Node}} to {{Element}}. - -

namespaceURI, -prefix, and -localName moved from {{Node}} to {{Element}} and -{{Attr}}. - -

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. - -

Interfaces: - -

- -

Interface members: - -

-
{{Node}} -
-
    -
  • isSupported -
  • getFeature() -
  • getUserData() -
  • setUserData() -
- -
{{Document}} -
-
    -
  • createEntityReference() -
  • xmlEncoding -
  • xmlStandalone -
  • xmlVersion -
  • strictErrorChecking -
  • domConfig -
  • normalizeDocument() -
  • renameNode() -
- -
{{DOMImplementation}} -
-
    -
  • getFeature() -
- -
{{Attr}} -
-
    -
  • schemaTypeInfo -
  • isId -
- -
{{Element}} -
-
    -
  • schemaTypeInfo -
  • setIdAttribute() -
  • setIdAttributeNS() -
  • setIdAttributeNode() -
- -
{{DocumentType}} -
-
    -
  • entities -
  • notations -
  • internalSubset -
- -
{{Text}} -
-
    -
  • isElementContentWhitespace -
  • replaceWholeText() -
-
- - -

DOM Ranges

- -

These are the changes made to the features described in the "Document Object Model Range" chapter -of DOM Level 2 Traversal and Range. - -

- - -

DOM Traversal

- -

These are the changes made to the features described in the "Document Object Model Traversal" -chapter of DOM Level 2 Traversal and Range. - -

- - -

Acknowledgments

There have been a lot of people that have helped make DOM more interoperable over the years and From de4c8610ea4ab0ce3fa2f80f3c23d074367ebd81 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Mon, 9 Nov 2020 11:55:36 +0100 Subject: [PATCH 2/5] restore some historical context --- dom.bs | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/dom.bs b/dom.bs index 809a6f0bd..dc8a27b36 100644 --- a/dom.bs +++ b/dom.bs @@ -9838,6 +9838,110 @@ methods on {{Document}}. +

Historical

+ +

{{DOMString}}, {{DOMException}}, and {{DOMTimeStamp}} are now defined in +Web IDL. And {{DOMStringList}} is now defined in HTML. [[WEBIDL]] [[HTML]] + +

These interfaces have been removed: + +

+ +

And these interface members have been removed: + +

+
{{Attr}} +
+
    +
  • schemaTypeInfo +
  • isId +
+ +
{{Document}} +
+
    +
  • createEntityReference() +
  • xmlEncoding +
  • xmlStandalone +
  • xmlVersion +
  • strictErrorChecking +
  • domConfig +
  • normalizeDocument() +
  • renameNode() +
+ +
{{DocumentType}} +
+
    +
  • entities +
  • notations +
  • internalSubset +
+ +
{{DOMImplementation}} +
+
    +
  • getFeature() +
+ +
{{Element}} +
+
    +
  • schemaTypeInfo +
  • setIdAttribute() +
  • setIdAttributeNS() +
  • setIdAttributeNode() +
+ +
{{Node}} +
+
    +
  • isSupported +
  • getFeature() +
  • getUserData() +
  • setUserData() +
+ +
{{NodeIterator}} +
+
    +
  • expandEntityReferences +
+ +
{{Text}} +
+
    +
  • isElementContentWhitespace +
  • replaceWholeText() +
+ +
{{TreeWalker}} +
+
    +
  • expandEntityReferences +
+
+ + +

Acknowledgments

There have been a lot of people that have helped make DOM more interoperable over the years and From 0d6e2b1dde7b1ca5fb2aececefdee058eabdfe93 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Mon, 9 Nov 2020 11:57:38 +0100 Subject: [PATCH 3/5] rename // historical to // legacy to avoid confusion --- dom.bs | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/dom.bs b/dom.bs index dc8a27b36..68d85ce89 100644 --- a/dom.bs +++ b/dom.bs @@ -380,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<EventTarget> composedPath(); @@ -391,12 +391,12 @@ 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; @@ -404,7 +404,7 @@ interface Event { [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 { @@ -772,7 +772,7 @@ incapable of setting {{Event/composed}}. It has to be supported for legacy conte

 partial interface Window {
-  [Replaceable] readonly attribute any event; // historical
+  [Replaceable] readonly attribute any event; // legacy
 };
 
@@ -796,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 { @@ -3674,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; @@ -3705,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; @@ -4732,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; @@ -4756,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(); @@ -5814,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 { @@ -9418,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); }; From ecd56a1b4d09de857873a27ff46b2d1406f78b6d Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Mon, 9 Nov 2020 12:07:15 +0100 Subject: [PATCH 4/5] provide a tiny bit of context --- dom.bs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dom.bs b/dom.bs index 68d85ce89..94e3b9166 100644 --- a/dom.bs +++ b/dom.bs @@ -9840,8 +9840,9 @@ methods on {{Document}}.

Historical

-

{{DOMString}}, {{DOMException}}, and {{DOMTimeStamp}} are now defined in -Web IDL. And {{DOMStringList}} is now defined in HTML. [[WEBIDL]] [[HTML]] +

Contrary to earlier revisions of this standard, {{DOMString}}, {{DOMException}}, +and {{DOMTimeStamp}} are now defined in Web IDL. {{DOMStringList}} is now defined in HTML. +[[WEBIDL]] [[HTML]]

These interfaces have been removed: From 643e4d8f49efd1888b61cac936091dadfbb488f7 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Mon, 9 Nov 2020 17:23:28 +0100 Subject: [PATCH 5/5] stop mentioning things that moved --- dom.bs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dom.bs b/dom.bs index 94e3b9166..ee0e6e148 100644 --- a/dom.bs +++ b/dom.bs @@ -9840,9 +9840,7 @@ methods on {{Document}}.

Historical

-

Contrary to earlier revisions of this standard, {{DOMString}}, {{DOMException}}, -and {{DOMTimeStamp}} are now defined in Web IDL. {{DOMStringList}} is now defined in HTML. -[[WEBIDL]] [[HTML]] +

This standard used to contain several interfaces and interface members that have been removed.

These interfaces have been removed: