Skip to content

Commit b80c4f9

Browse files
authored
Editorial: align with IDL (void → undefined)
1 parent e191f73 commit b80c4f9

File tree

1 file changed

+45
-45
lines changed

1 file changed

+45
-45
lines changed

dom.bs

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -440,21 +440,21 @@ interface Event {
440440
const unsigned short BUBBLING_PHASE = 3;
441441
readonly attribute unsigned short eventPhase;
442442

443-
void stopPropagation();
443+
undefined stopPropagation();
444444
attribute boolean cancelBubble; // historical alias of .stopPropagation
445-
void stopImmediatePropagation();
445+
undefined stopImmediatePropagation();
446446

447447
readonly attribute boolean bubbles;
448448
readonly attribute boolean cancelable;
449449
attribute boolean returnValue; // historical
450-
void preventDefault();
450+
undefined preventDefault();
451451
readonly attribute boolean defaultPrevented;
452452
readonly attribute boolean composed;
453453

454454
[LegacyUnforgeable] readonly attribute boolean isTrusted;
455455
readonly attribute DOMHighResTimeStamp timeStamp;
456456

457-
void initEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false); // historical
457+
undefined initEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false); // historical
458458
};
459459

460460
dictionary EventInit {
@@ -846,7 +846,7 @@ interface CustomEvent : Event {
846846

847847
readonly attribute any detail;
848848

849-
void initCustomEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, optional any detail = null); // historical
849+
undefined initCustomEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, optional any detail = null); // historical
850850
};
851851

852852
dictionary CustomEventInit : EventInit {
@@ -996,13 +996,13 @@ for historical reasons.
996996
interface EventTarget {
997997
constructor();
998998

999-
void addEventListener(DOMString type, EventListener? callback, optional (AddEventListenerOptions or boolean) options = {});
1000-
void removeEventListener(DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options = {});
999+
undefined addEventListener(DOMString type, EventListener? callback, optional (AddEventListenerOptions or boolean) options = {});
1000+
undefined removeEventListener(DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options = {});
10011001
boolean dispatchEvent(Event event);
10021002
};
10031003

10041004
callback interface EventListener {
1005-
void handleEvent(Event event);
1005+
undefined handleEvent(Event event);
10061006
};
10071007

10081008
dictionary EventListenerOptions {
@@ -1759,7 +1759,7 @@ interface AbortController {
17591759

17601760
[SameObject] readonly attribute AbortSignal signal;
17611761

1762-
void abort();
1762+
undefined abort();
17631763
};
17641764
</pre>
17651765

@@ -2800,9 +2800,9 @@ interface mixin ParentNode {
28002800
readonly attribute Element? lastElementChild;
28012801
readonly attribute unsigned long childElementCount;
28022802

2803-
[CEReactions, Unscopable] void prepend((Node or DOMString)... nodes);
2804-
[CEReactions, Unscopable] void append((Node or DOMString)... nodes);
2805-
[CEReactions, Unscopable] void replaceChildren((Node or DOMString)... nodes);
2803+
[CEReactions, Unscopable] undefined prepend((Node or DOMString)... nodes);
2804+
[CEReactions, Unscopable] undefined append((Node or DOMString)... nodes);
2805+
[CEReactions, Unscopable] undefined replaceChildren((Node or DOMString)... nodes);
28062806

28072807
Element? querySelector(DOMString selectors);
28082808
[NewObject] NodeList querySelectorAll(DOMString selectors);
@@ -2962,10 +2962,10 @@ getter must return the first <a>following</a> <a for=tree>sibling</a> that is an
29622962

29632963
<pre class=idl>
29642964
interface mixin ChildNode {
2965-
[CEReactions, Unscopable] void before((Node or DOMString)... nodes);
2966-
[CEReactions, Unscopable] void after((Node or DOMString)... nodes);
2967-
[CEReactions, Unscopable] void replaceWith((Node or DOMString)... nodes);
2968-
[CEReactions, Unscopable] void remove();
2965+
[CEReactions, Unscopable] undefined before((Node or DOMString)... nodes);
2966+
[CEReactions, Unscopable] undefined after((Node or DOMString)... nodes);
2967+
[CEReactions, Unscopable] undefined replaceWith((Node or DOMString)... nodes);
2968+
[CEReactions, Unscopable] undefined remove();
29692969
};
29702970
DocumentType includes ChildNode;
29712971
Element includes ChildNode;
@@ -3333,12 +3333,12 @@ they do not get lost when {{MutationObserverInit/subtree}} is set to true on <a
33333333
interface MutationObserver {
33343334
constructor(MutationCallback callback);
33353335

3336-
void observe(Node target, optional MutationObserverInit options = {});
3337-
void disconnect();
3336+
undefined observe(Node target, optional MutationObserverInit options = {});
3337+
undefined disconnect();
33383338
sequence&lt;MutationRecord> takeRecords();
33393339
};
33403340

3341-
callback MutationCallback = void (sequence&lt;MutationRecord> mutations, MutationObserver observer);
3341+
callback MutationCallback = undefined (sequence&lt;MutationRecord> mutations, MutationObserver observer);
33423342

33433343
dictionary MutationObserverInit {
33443344
boolean childList = false;
@@ -3753,7 +3753,7 @@ interface Node : EventTarget {
37533753

37543754
[CEReactions] attribute DOMString? nodeValue;
37553755
[CEReactions] attribute DOMString? textContent;
3756-
[CEReactions] void normalize();
3756+
[CEReactions] undefined normalize();
37573757

37583758
[CEReactions, NewObject] Node cloneNode(optional boolean deep = false);
37593759
boolean isEqualNode(Node? otherNode);
@@ -5844,10 +5844,10 @@ interface Element : Node {
58445844
sequence&lt;DOMString> getAttributeNames();
58455845
DOMString? getAttribute(DOMString qualifiedName);
58465846
DOMString? getAttributeNS(DOMString? namespace, DOMString localName);
5847-
[CEReactions] void setAttribute(DOMString qualifiedName, DOMString value);
5848-
[CEReactions] void setAttributeNS(DOMString? namespace, DOMString qualifiedName, DOMString value);
5849-
[CEReactions] void removeAttribute(DOMString qualifiedName);
5850-
[CEReactions] void removeAttributeNS(DOMString? namespace, DOMString localName);
5847+
[CEReactions] undefined setAttribute(DOMString qualifiedName, DOMString value);
5848+
[CEReactions] undefined setAttributeNS(DOMString? namespace, DOMString qualifiedName, DOMString value);
5849+
[CEReactions] undefined removeAttribute(DOMString qualifiedName);
5850+
[CEReactions] undefined removeAttributeNS(DOMString? namespace, DOMString localName);
58515851
[CEReactions] boolean toggleAttribute(DOMString qualifiedName, optional boolean force);
58525852
boolean hasAttribute(DOMString qualifiedName);
58535853
boolean hasAttributeNS(DOMString? namespace, DOMString localName);
@@ -5870,7 +5870,7 @@ interface Element : Node {
58705870
HTMLCollection getElementsByClassName(DOMString classNames);
58715871

58725872
[CEReactions] Element? insertAdjacentElement(DOMString where, Element element); // historical
5873-
void insertAdjacentText(DOMString where, DOMString data); // historical
5873+
undefined insertAdjacentText(DOMString where, DOMString data); // historical
58745874
};
58755875

58765876
dictionary ShadowRootInit {
@@ -7121,10 +7121,10 @@ interface CharacterData : Node {
71217121
attribute [LegacyNullToEmptyString] DOMString data;
71227122
readonly attribute unsigned long length;
71237123
DOMString substringData(unsigned long offset, unsigned long count);
7124-
void appendData(DOMString data);
7125-
void insertData(unsigned long offset, DOMString data);
7126-
void deleteData(unsigned long offset, unsigned long count);
7127-
void replaceData(unsigned long offset, unsigned long count, DOMString data);
7124+
undefined appendData(DOMString data);
7125+
undefined insertData(unsigned long offset, DOMString data);
7126+
undefined deleteData(unsigned long offset, unsigned long count);
7127+
undefined replaceData(unsigned long offset, unsigned long count, DOMString data);
71287128
};
71297129
</pre>
71307130

@@ -7682,30 +7682,30 @@ interface Range : AbstractRange {
76827682

76837683
readonly attribute Node commonAncestorContainer;
76847684

7685-
void setStart(Node node, unsigned long offset);
7686-
void setEnd(Node node, unsigned long offset);
7687-
void setStartBefore(Node node);
7688-
void setStartAfter(Node node);
7689-
void setEndBefore(Node node);
7690-
void setEndAfter(Node node);
7691-
void collapse(optional boolean toStart = false);
7692-
void selectNode(Node node);
7693-
void selectNodeContents(Node node);
7685+
undefined setStart(Node node, unsigned long offset);
7686+
undefined setEnd(Node node, unsigned long offset);
7687+
undefined setStartBefore(Node node);
7688+
undefined setStartAfter(Node node);
7689+
undefined setEndBefore(Node node);
7690+
undefined setEndAfter(Node node);
7691+
undefined collapse(optional boolean toStart = false);
7692+
undefined selectNode(Node node);
7693+
undefined selectNodeContents(Node node);
76947694

76957695
const unsigned short START_TO_START = 0;
76967696
const unsigned short START_TO_END = 1;
76977697
const unsigned short END_TO_END = 2;
76987698
const unsigned short END_TO_START = 3;
76997699
short compareBoundaryPoints(unsigned short how, Range sourceRange);
77007700

7701-
[CEReactions] void deleteContents();
7701+
[CEReactions] undefined deleteContents();
77027702
[CEReactions, NewObject] DocumentFragment extractContents();
77037703
[CEReactions, NewObject] DocumentFragment cloneContents();
7704-
[CEReactions] void insertNode(Node node);
7705-
[CEReactions] void surroundContents(Node newParent);
7704+
[CEReactions] undefined insertNode(Node node);
7705+
[CEReactions] undefined surroundContents(Node newParent);
77067706

77077707
[NewObject] Range cloneRange();
7708-
void detach();
7708+
undefined detach();
77097709

77107710
boolean isPointInRange(Node node, unsigned long offset);
77117711
short comparePoint(Node node, unsigned long offset);
@@ -9035,7 +9035,7 @@ interface NodeIterator {
90359035
Node? nextNode();
90369036
Node? previousNode();
90379037

9038-
void detach();
9038+
undefined detach();
90399039
};
90409040
</pre>
90419041

@@ -9519,8 +9519,8 @@ interface DOMTokenList {
95199519
readonly attribute unsigned long length;
95209520
getter DOMString? item(unsigned long index);
95219521
boolean contains(DOMString token);
9522-
[CEReactions] void add(DOMString... tokens);
9523-
[CEReactions] void remove(DOMString... tokens);
9522+
[CEReactions] undefined add(DOMString... tokens);
9523+
[CEReactions] undefined remove(DOMString... tokens);
95249524
[CEReactions] boolean toggle(DOMString token, optional boolean force);
95259525
[CEReactions] boolean replace(DOMString token, DOMString newToken);
95269526
boolean supports(DOMString token);

0 commit comments

Comments
 (0)