@@ -49,43 +49,6 @@ spec:html; type:element
49
49
50
50
51
51
52
- <h2 id=goals class=no-num>Goals</h2>
53
-
54
- This specification standardizes the DOM. It does so as follows:
55
-
56
- <ol>
57
- <li>
58
- <p> By consolidating <cite> DOM Level 3 Core</cite> [[DOM-Level-3-Core]] ,
59
- <cite> Element Traversal</cite> [[ELEMENTTRAVERSAL]] ,
60
- <cite> Selectors API Level 2</cite> [[SELECTORS-API2]] , the
61
- "DOM Event Architecture" and "Basic Event Interfaces" chapters of
62
- <cite> DOM Level 3 Events</cite> [[uievents-20031107]] (specific types of events do not
63
- belong in the DOM Standard), and <cite> DOM Level 2 Traversal and Range</cite>
64
- [[DOM-Level-2-Traversal-Range]] , and:
65
-
66
- <ul class=brief>
67
- <li> Aligning them with the JavaScript ecosystem where possible.
68
- <li> Aligning them with existing implementations.
69
- <li> Simplifying them as much as possible.
70
- </ul>
71
-
72
- <li><p> By moving features from the HTML Standard [[!HTML]] that make more sense to be
73
- specified as part of the DOM Standard.
74
-
75
- <li>
76
- <p> By defining a replacement for the "Mutation Events" and
77
- "Mutation Name Event Types" chapters of <cite> DOM Level 3 Events</cite>
78
- [[uievents-20031107]] as the old model
79
- was problematic.
80
-
81
- <p class="note no-backref"> The old model is expected to be removed from implementations
82
- in due course.
83
-
84
- <li><p> By defining new features that simplify common DOM operations.
85
- </ol>
86
-
87
-
88
-
89
52
<h2 id=infrastructure oldids=terminology,dependencies>Infrastructure</h2>
90
53
91
54
<p> This specification depends on the Infra Standard. [[!INFRA]]
@@ -417,7 +380,7 @@ interface Event {
417
380
418
381
readonly attribute DOMString type;
419
382
readonly attribute EventTarget? target;
420
- readonly attribute EventTarget? srcElement; // historical
383
+ readonly attribute EventTarget? srcElement; // legacy
421
384
readonly attribute EventTarget? currentTarget;
422
385
sequence<EventTarget> composedPath();
423
386
@@ -428,20 +391,20 @@ interface Event {
428
391
readonly attribute unsigned short eventPhase;
429
392
430
393
undefined stopPropagation();
431
- attribute boolean cancelBubble; // historical alias of .stopPropagation
394
+ attribute boolean cancelBubble; // legacy alias of .stopPropagation()
432
395
undefined stopImmediatePropagation();
433
396
434
397
readonly attribute boolean bubbles;
435
398
readonly attribute boolean cancelable;
436
- attribute boolean returnValue; // historical
399
+ attribute boolean returnValue; // legacy
437
400
undefined preventDefault();
438
401
readonly attribute boolean defaultPrevented;
439
402
readonly attribute boolean composed;
440
403
441
404
[LegacyUnforgeable] readonly attribute boolean isTrusted;
442
405
readonly attribute DOMHighResTimeStamp timeStamp;
443
406
444
- undefined initEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false); // historical
407
+ undefined initEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false); // legacy
445
408
};
446
409
447
410
dictionary EventInit {
@@ -809,7 +772,7 @@ incapable of setting {{Event/composed}}. It has to be supported for legacy conte
809
772
810
773
<pre class=idl>
811
774
partial interface Window {
812
- [Replaceable] readonly attribute any event; // historical
775
+ [Replaceable] readonly attribute any event; // legacy
813
776
};
814
777
</pre>
815
778
@@ -833,7 +796,7 @@ interface CustomEvent : Event {
833
796
834
797
readonly attribute any detail;
835
798
836
- undefined initCustomEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, optional any detail = null); // historical
799
+ undefined initCustomEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, optional any detail = null); // legacy
837
800
};
838
801
839
802
dictionary CustomEventInit : EventInit {
@@ -3711,14 +3674,14 @@ interface Node : EventTarget {
3711
3674
const unsigned short ATTRIBUTE_NODE = 2;
3712
3675
const unsigned short TEXT_NODE = 3;
3713
3676
const unsigned short CDATA_SECTION_NODE = 4;
3714
- const unsigned short ENTITY_REFERENCE_NODE = 5; // historical
3715
- const unsigned short ENTITY_NODE = 6; // historical
3677
+ const unsigned short ENTITY_REFERENCE_NODE = 5; // legacy
3678
+ const unsigned short ENTITY_NODE = 6; // legacy
3716
3679
const unsigned short PROCESSING_INSTRUCTION_NODE = 7;
3717
3680
const unsigned short COMMENT_NODE = 8;
3718
3681
const unsigned short DOCUMENT_NODE = 9;
3719
3682
const unsigned short DOCUMENT_TYPE_NODE = 10;
3720
3683
const unsigned short DOCUMENT_FRAGMENT_NODE = 11;
3721
- const unsigned short NOTATION_NODE = 12; // historical
3684
+ const unsigned short NOTATION_NODE = 12; // legacy
3722
3685
readonly attribute unsigned short nodeType;
3723
3686
readonly attribute DOMString nodeName;
3724
3687
@@ -3742,7 +3705,7 @@ interface Node : EventTarget {
3742
3705
3743
3706
[CEReactions, NewObject] Node cloneNode(optional boolean deep = false);
3744
3707
boolean isEqualNode(Node? otherNode);
3745
- boolean isSameNode(Node? otherNode); // historical alias of ===
3708
+ boolean isSameNode(Node? otherNode); // legacy alias of ===
3746
3709
3747
3710
const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01;
3748
3711
const unsigned short DOCUMENT_POSITION_PRECEDING = 0x02;
@@ -4769,8 +4732,8 @@ interface Document : Node {
4769
4732
readonly attribute USVString documentURI;
4770
4733
readonly attribute DOMString compatMode;
4771
4734
readonly attribute DOMString characterSet;
4772
- readonly attribute DOMString charset; // historical alias of .characterSet
4773
- readonly attribute DOMString inputEncoding; // historical alias of .characterSet
4735
+ readonly attribute DOMString charset; // legacy alias of .characterSet
4736
+ readonly attribute DOMString inputEncoding; // legacy alias of .characterSet
4774
4737
readonly attribute DOMString contentType;
4775
4738
4776
4739
readonly attribute DocumentType? doctype;
@@ -4793,7 +4756,7 @@ interface Document : Node {
4793
4756
[NewObject] Attr createAttribute(DOMString localName);
4794
4757
[NewObject] Attr createAttributeNS(DOMString? namespace, DOMString qualifiedName);
4795
4758
4796
- [NewObject] Event createEvent(DOMString interface); // historical
4759
+ [NewObject] Event createEvent(DOMString interface); // legacy
4797
4760
4798
4761
[NewObject] Range createRange();
4799
4762
@@ -5851,14 +5814,14 @@ interface Element : Node {
5851
5814
5852
5815
Element? closest(DOMString selectors);
5853
5816
boolean matches(DOMString selectors);
5854
- boolean webkitMatchesSelector(DOMString selectors); // historical alias of .matches
5817
+ boolean webkitMatchesSelector(DOMString selectors); // legacy alias of .matches
5855
5818
5856
5819
HTMLCollection getElementsByTagName(DOMString qualifiedName);
5857
5820
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
5858
5821
HTMLCollection getElementsByClassName(DOMString classNames);
5859
5822
5860
- [CEReactions] Element? insertAdjacentElement(DOMString where, Element element); // historical
5861
- undefined insertAdjacentText(DOMString where, DOMString data); // historical
5823
+ [CEReactions] Element? insertAdjacentElement(DOMString where, Element element); // legacy
5824
+ undefined insertAdjacentText(DOMString where, DOMString data); // legacy
5862
5825
};
5863
5826
5864
5827
dictionary ShadowRootInit {
@@ -9455,14 +9418,14 @@ callback interface NodeFilter {
9455
9418
const unsigned long SHOW_ATTRIBUTE = 0x2;
9456
9419
const unsigned long SHOW_TEXT = 0x4;
9457
9420
const unsigned long SHOW_CDATA_SECTION = 0x8;
9458
- const unsigned long SHOW_ENTITY_REFERENCE = 0x10; // historical
9459
- const unsigned long SHOW_ENTITY = 0x20; // historical
9421
+ const unsigned long SHOW_ENTITY_REFERENCE = 0x10; // legacy
9422
+ const unsigned long SHOW_ENTITY = 0x20; // legacy
9460
9423
const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x40;
9461
9424
const unsigned long SHOW_COMMENT = 0x80;
9462
9425
const unsigned long SHOW_DOCUMENT = 0x100;
9463
9426
const unsigned long SHOW_DOCUMENT_TYPE = 0x200;
9464
9427
const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x400;
9465
- const unsigned long SHOW_NOTATION = 0x800; // historical
9428
+ const unsigned long SHOW_NOTATION = 0x800; // legacy
9466
9429
9467
9430
unsigned short acceptNode(Node node);
9468
9431
};
@@ -9877,47 +9840,9 @@ methods on {{Document}}.
9877
9840
9878
9841
<h2 id=historical>Historical</h2>
9879
9842
9880
- <p> As explained in <a href="#goals">goals</a> this standard is a significant revision of various
9881
- obsolete DOM specifications. This section enumerates the incompatible changes.
9882
-
9883
-
9884
- <h3 id=dom-events-changes>DOM Events</h3>
9843
+ <p> This standard used to contain several interfaces and interface members that have been removed.
9885
9844
9886
- <p> These are the changes made to the features described in the "DOM Event Architecture",
9887
- "Basic Event Interfaces", "Mutation Events", and "Mutation Name Event Types" chapters of
9888
- <cite> DOM Level 3 Events</cite> . The other chapters are defined by the <cite> UI Events</cite>
9889
- specification. [[!UIEVENTS]]
9890
-
9891
- <ul class=brief>
9892
- <li> Removes <dfn interface>MutationEvent</dfn> and <dfn interface>MutationNameEvent</dfn> .
9893
- <li> Fire is no longer synonymous with dispatch, but includes initializing an event.
9894
- <li> The propagation and canceled flags are unset when invoking {{Event/initEvent()}} rather than
9895
- after dispatch.
9896
- <li> {{Event}} 's {{Event/timeStamp}} attribute is a {{DOMHighResTimeStamp}} rather than a
9897
- {{DOMTimeStamp}} .
9898
- </ul>
9899
-
9900
-
9901
- <h3 id=dom-core-changes>DOM Core</h3>
9902
-
9903
- <p> These are the changes made to the features described in <cite> DOM Level 3 Core</cite> .
9904
-
9905
- <p> {{DOMString}} , {{DOMException}} , and {{DOMTimeStamp}} are now defined in Web IDL.
9906
-
9907
- <p id=domstringlist> {{DOMStringList}} is now defined in HTML.
9908
-
9909
- <p> <dfn method for=Node><code>hasAttributes()</code></dfn> and
9910
- <dfn attribute for=Node><code>attributes</code></dfn> moved from {{Node}} to {{Element}} .
9911
-
9912
- <p> <dfn attribute for=Node><code>namespaceURI</code></dfn> ,
9913
- <dfn attribute for=Node><code>prefix</code></dfn> , and
9914
- <dfn attribute for=Node><code>localName</code></dfn> moved from {{Node}} to {{Element}} and
9915
- {{Attr}} .
9916
-
9917
- <p> The remainder of interfaces and interface members listed in this section were removed to simplify
9918
- the web platform. Implementations conforming to this specification will not support them.
9919
-
9920
- <p> Interfaces:
9845
+ <p> These interfaces have been removed:
9921
9846
9922
9847
<ul class=brief dfn-type="interface">
9923
9848
<li> <dfn><code>DOMConfiguration</code></dfn>
@@ -9930,22 +9855,23 @@ the web platform. Implementations conforming to this specification will not supp
9930
9855
<li> <dfn><code>DOMUserData</code></dfn>
9931
9856
<li> <dfn><code>Entity</code></dfn>
9932
9857
<li> <dfn><code>EntityReference</code></dfn>
9858
+ <li> <dfn><code>MutationEvent</code></dfn>
9859
+ <li> <dfn><code>MutationNameEvent</code></dfn>
9933
9860
<li> <dfn><code>NameList</code></dfn>
9934
9861
<li> <dfn><code>Notation</code></dfn>
9862
+ <li> <dfn><code>RangeException</code></dfn>
9935
9863
<li> <dfn><code>TypeInfo</code></dfn>
9936
9864
<li> <dfn><code>UserDataHandler</code></dfn>
9937
9865
</ul>
9938
9866
9939
- <p> Interface members:
9867
+ <p> And these interface members have been removed :
9940
9868
9941
9869
<dl>
9942
- <dt> {{Node }}
9870
+ <dt> {{Attr }}
9943
9871
<dd>
9944
9872
<ul class=brief>
9945
- <li> <dfn attribute for=Node><code>isSupported</code></dfn>
9946
- <li> <dfn method for=Node><code>getFeature()</code></dfn>
9947
- <li> <dfn method for=Node><code>getUserData()</code></dfn>
9948
- <li> <dfn method for=Node><code>setUserData()</code></dfn>
9873
+ <li> <dfn attribute for=Attr><code>schemaTypeInfo</code></dfn>
9874
+ <li> <dfn attribute for=Attr><code>isId</code></dfn>
9949
9875
</ul>
9950
9876
9951
9877
<dt> {{Document}}
@@ -9961,17 +9887,18 @@ the web platform. Implementations conforming to this specification will not supp
9961
9887
<li> <dfn method for=Document><code>renameNode()</code></dfn>
9962
9888
</ul>
9963
9889
9964
- <dt> {{DOMImplementation }}
9890
+ <dt> {{DocumentType }}
9965
9891
<dd>
9966
9892
<ul class=brief>
9967
- <li> <dfn method for=DOMImplementation><code>getFeature()</code></dfn>
9893
+ <li> <dfn attribute for=DocumentType><code>entities</code></dfn>
9894
+ <li> <dfn attribute for=DocumentType><code>notations</code></dfn>
9895
+ <li> <dfn attribute for=DocumentType><code>internalSubset</code></dfn>
9968
9896
</ul>
9969
9897
9970
- <dt> {{Attr }}
9898
+ <dt> {{DOMImplementation }}
9971
9899
<dd>
9972
9900
<ul class=brief>
9973
- <li> <dfn attribute for=Attr><code>schemaTypeInfo</code></dfn>
9974
- <li> <dfn attribute for=Attr><code>isId</code></dfn>
9901
+ <li> <dfn method for=DOMImplementation><code>getFeature()</code></dfn>
9975
9902
</ul>
9976
9903
9977
9904
<dt> {{Element}}
@@ -9983,12 +9910,19 @@ the web platform. Implementations conforming to this specification will not supp
9983
9910
<li> <dfn method for=Element><code>setIdAttributeNode()</code></dfn>
9984
9911
</ul>
9985
9912
9986
- <dt> {{DocumentType }}
9913
+ <dt> {{Node }}
9987
9914
<dd>
9988
9915
<ul class=brief>
9989
- <li> <dfn attribute for=DocumentType><code>entities</code></dfn>
9990
- <li> <dfn attribute for=DocumentType><code>notations</code></dfn>
9991
- <li> <dfn attribute for=DocumentType><code>internalSubset</code></dfn>
9916
+ <li> <dfn attribute for=Node><code>isSupported</code></dfn>
9917
+ <li> <dfn method for=Node><code>getFeature()</code></dfn>
9918
+ <li> <dfn method for=Node><code>getUserData()</code></dfn>
9919
+ <li> <dfn method for=Node><code>setUserData()</code></dfn>
9920
+ </ul>
9921
+
9922
+ <dt> {{NodeIterator}}
9923
+ <dd>
9924
+ <ul class=brief>
9925
+ <li> <dfn for=NodeIterator attribute>expandEntityReferences</dfn>
9992
9926
</ul>
9993
9927
9994
9928
<dt> {{Text}}
@@ -9997,34 +9931,13 @@ the web platform. Implementations conforming to this specification will not supp
9997
9931
<li> <dfn attribute for=Text><code>isElementContentWhitespace</code></dfn>
9998
9932
<li> <dfn method for=Text><code>replaceWholeText()</code></dfn>
9999
9933
</ul>
10000
- </dl>
10001
-
10002
-
10003
- <h3 id=dom-ranges-changes>DOM Ranges</h3>
10004
-
10005
- <p> These are the changes made to the features described in the "Document Object Model Range" chapter
10006
- of <cite> DOM Level 2 Traversal and Range</cite> .
10007
-
10008
- <ul class=brief>
10009
- <li> <dfn interface>RangeException</dfn> has been removed.
10010
- <li> {{Range/detach()}} is now a no-op.
10011
- </ul>
10012
9934
10013
-
10014
- <h3 id=dom-traversal-changes>DOM Traversal</h3>
10015
-
10016
- <p> These are the changes made to the features described in the "Document Object Model Traversal"
10017
- chapter of <cite> DOM Level 2 Traversal and Range</cite> .
10018
-
10019
- <ul class=brief>
10020
- <li> {{createNodeIterator()}} and {{createTreeWalker()}} now have optional arguments and lack a
10021
- fourth argument which is no longer relevant given entity references never made it into the DOM.
10022
- <li> The <dfn for="NodeIterator, TreeWalker" attribute>expandEntityReferences</dfn> attribute has
10023
- been removed from the {{NodeIterator}} and {{TreeWalker}} interfaces for the aforementioned reason.
10024
- <li> {{NodeIterator/nextNode()}} and {{NodeIterator/previousNode()}} now throw when invoked from a
10025
- {{NodeFilter}} to align with user agents.
10026
- <li> {{NodeIterator/detach()}} is now a no-op.
10027
- </ul>
9935
+ <dt> {{TreeWalker}}
9936
+ <dd>
9937
+ <ul class=brief>
9938
+ <li> <dfn for=TreeWalker attribute>expandEntityReferences</dfn>
9939
+ </ul>
9940
+ </dl>
10028
9941
10029
9942
10030
9943
0 commit comments