Skip to content

Commit f45e03f

Browse files
committed
h2m (5e1591d) for web/javascript
1 parent b14d50a commit f45e03f

File tree

23 files changed

+573
-75
lines changed

23 files changed

+573
-75
lines changed

files/en-us/_redirects.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6991,8 +6991,6 @@
69916991
/en-US/docs/Web/API/Blob.type /en-US/docs/Web/API/Blob/type
69926992
/en-US/docs/Web/API/BlobEvent.BlobEvent /en-US/docs/Web/API/BlobEvent/BlobEvent
69936993
/en-US/docs/Web/API/BlobEvent.data /en-US/docs/Web/API/BlobEvent/data
6994-
/en-US/docs/Web/API/BluetoothCharacteristicProperties/writableAuxiliar /en-US/docs/Web/API/BluetoothCharacteristicProperties/writableAuxiliaries
6995-
/en-US/docs/Web/API/BluetoothCharacteristicProperties/writeWithoutRespponse /en-US/docs/Web/API/BluetoothCharacteristicProperties/writeWithoutResponse
69966994
/en-US/docs/Web/API/BluetoothDevice.name /en-US/docs/Web/API/BluetoothDevice/name
69976995
/en-US/docs/Web/API/BluetoothDevice.paired /en-US/docs/Web/API/BluetoothDevice/paired
69986996
/en-US/docs/Web/API/BluetoothDevice.uuids /en-US/docs/Web/API/BluetoothDevice/uuids

files/en-us/web/accessibility/aria/roles/listbox_role/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ <h4 id="Associated_Roles">Associated Roles</h4>
2626

2727
<dl>
2828
<dt><a href="/en-US/docs/Web/Accessibility/ARIA/Roles/option_role">option</a></dt>
29-
<dd>One or more nested options are required. All selected options have <code>aria-selected</code> set to <code>true</code>. All options that are not selected have <code>aria-selected</code> set to <code>false</code>. If an option is not selectable, omit the <code>aria-selected</code>.</dd>
29+
<dd>One or more nested options are required. All selected options have <code>aria-selected</code> set to <code>true</code>. All options that are not selected have <code>aria-selected</code> set to <code>false</code> If an option is not selectable, omit the <code>aria-selected</code>.</dd>
3030
<dt><a href="/en-US/docs/Web/Accessibility/ARIA/Roles/List_role">list</a></dt>
3131
<dd>A section containing <code>listitem</code> elements</dd>
3232
</dl>
@@ -35,9 +35,9 @@ <h4 id="States_and_Properties">States and Properties</h4>
3535

3636
<dl>
3737
<dt>aria-activedescendant</dt>
38-
<dd>Holds the <code>id</code> string of the currently active element within the listbox. If that's an option element, then that would be the <code>id</code> of the most recently interacted with option, regardless of whether that option has an <code>aria-selected</code> value of <code>true</code> or not. Takes the value of only one <code>id</code>, even in a multiselectable listbox. If the <code>id</code> does not refer to a DOM descendant of the listbox, then that <code>id</code> must be included among the IDs in the <code>aria-owns</code> attribute.</dd>
38+
<dd>Holds the <code>id</code> string of the currently active element within the listbox.  If that's an option element, then that would be the <code>id</code> of the most recently interacted with option, regardless of whether that option has an <code>aria-selected</code> value of <code>true</code> or not. Takes the value of only one <code>id</code>, even in a multiselectable listbox.  If the <code>id</code> does not refer to a DOM descendant of the listbox, then that <code>id</code> must be included among the IDs in the <code>aria-owns</code> attrubute.</dd>
3939
<dt>aria-owns</dt>
40-
<dd>This is a space-separated list of element IDs which are not DOM child elements of the listbox. IDs listed here cannot also be listed in <code>aria-owns</code> attributes of any other elements.</dd>
40+
<dd>This is a space-separated list of element IDs which are not DOM child elements of the listbox.  IDs listed here cannot also be listed in <code>aria-owns</code> attributes of any other elements.</dd>
4141
<dt>aria-multiselectable</dt>
4242
<dd>Include and set to <code>true</code> if the user can select more than one option. If set to <code>true</code>, <em>every</em> selectable option should have an <code>aria-selected</code> attribute included and set to <code>true</code> or <code>false</code>.  Options which are <em>not</em> selectable <em>should not</em> have the <code>aria-selected</code> attribute.</dd>
4343
<dd>If <code>false</code> or omitted, only the currently selected option, if any option is selected, needs the <code>aria-selected</code> attribute, and it must be set to <code>true</code>.</dd>
@@ -46,11 +46,11 @@ <h4 id="States_and_Properties">States and Properties</h4>
4646
<dt>aria-readonly</dt>
4747
<dd>The user cannot change which options are selected or unselected, but the listbox is otherwise operable.</dd>
4848
<dt>aria-label</dt>
49-
<dd>A human-readable string value which identifies the listbox. If there's a visible label, then <code>aria-labelledby</code> should be used instead to refer to that label.</dd>
49+
<dd>A human-readable string value which identifies the listbox.  If there's a visible label, then <code>aria-labelledby</code> should be used instead to refer to that label.</dd>
5050
<dt>aria-labelledby</dt>
51-
<dd>Identifies the visible element or elements in a space-separated list of element IDs which identify the listbox. If there's no visible label, then <code>aria-label</code> should be used instead to include a label. (Note: "labelled", with two L's, is the correct spelling based on the accessibility API conventions.)</dd>
51+
<dd>Identifies the visible element or elements in a space-separated list of element IDs which identify the listbox.  If there's no visible label, then <code>aria-label</code> should be used instead to include a label.  (Note: "labelled", with two L's, is the correct spelling based on the accessibility API conventions.)</dd>
5252
<dt>aria-roledescription</dt>
53-
<dd>A human-readable string value which more clearly identifies the role of the listbox. Screen readers will often read this value to the user after reading the label (if there is one), in place of saying "listbox".</dd>
53+
<dd>A human-readable string value which more clearly identifies the role of the listbox.  Screen readers will often read this value to the user after reading the label (if there is one), in place of saying "listbox".</dd>
5454
</dl>
5555

5656
<p>(For further details and a full list of ARIA states and properties see the <a href="https://www.w3.org/TR/wai-aria-1.1/#listbox">ARIA <code>listbox</code> (role)</a> documentation.)</p>

files/en-us/web/api/bluetoothcharacteristicproperties/writableauxiliaries/index.html renamed to files/en-us/web/api/bluetoothcharacteristicproperties/writableauxiliar/index.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: BluetoothCharacteristicProperties.writableAuxiliaries
3-
slug: Web/API/BluetoothCharacteristicProperties/writableAuxiliaries
3+
slug: Web/API/BluetoothCharacteristicProperties/writableAuxiliar
44
tags:
55
- API
66
- Bluetooth
@@ -11,7 +11,6 @@
1111
- Reference
1212
- Web Bluetooth API
1313
- writableAuxiliaries
14-
browser-compat: api.BluetoothCharacteristicProperties.writableAuxiliaries
1514
---
1615
<div>{{draft}}{{securecontext_header}}{{APIRef("Bluetooth API")}}</div>
1716

@@ -49,4 +48,4 @@ <h2 id="Specifications">Specifications</h2>
4948

5049
<h2 id="Browser_compatibility">Browser compatibility</h2>
5150

52-
<p>{{Compat}}</p>
51+
<p>{{Compat("api.BluetoothCharacteristicProperties.writableAuxiliaries")}}</p>

files/en-us/web/api/bluetoothcharacteristicproperties/writewithoutresponse/index.html renamed to files/en-us/web/api/bluetoothcharacteristicproperties/writewithoutrespponse/index.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: BluetoothCharacteristicProperties.writeWithoutResponse
3-
slug: Web/API/BluetoothCharacteristicProperties/writeWithoutResponse
3+
slug: Web/API/BluetoothCharacteristicProperties/writeWithoutRespponse
44
tags:
55
- API
66
- Bluetooth
@@ -11,7 +11,6 @@
1111
- Reference
1212
- Web Bluetooth API
1313
- writeWithoutResponse
14-
browser-compat: api.BluetoothCharacteristicProperties.writeWithoutResponse
1514
---
1615
<div>{{draft}}{{securecontext_header}}{{APIRef("Bluetooth API")}}</div>
1716

@@ -49,4 +48,4 @@ <h2 id="Specifications">Specifications</h2>
4948

5049
<h2 id="Browser_compatibility">Browser compatibility</h2>
5150

52-
<p>{{Compat}}</p>
51+
<p>{{Compat("api.BluetoothCharacteristicProperties.writeWithoutResponse")}}</p>

files/en-us/web/api/clipboarditem/presentationstyle/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
- presentationStyle
1414
- copy
1515
- paste
16-
browser-compat: api.ClipboardItem.presentationStyle
1716
---
1817
<div>{{DefaultAPISidebar("Clipboard API")}}</div>
1918

@@ -69,7 +68,7 @@ <h2 id="Specifications">Specifications</h2>
6968

7069
<h2 id="Browser_compatibility">Browser compatibility</h2>
7170

72-
<p>{{Compat}}</p>
71+
<p>{{Compat("api.ClipboardItem.types")}}</p>
7372

7473
<h2 id="See_also">See also</h2>
7574

files/en-us/web/api/css/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
- Interface
88
- Painting
99
- Reference
10-
browser-compat: api.CSS
1110
---
1211
<div>{{APIRef("CSSOM")}}</div>
1312

@@ -77,7 +76,7 @@ <h2 id="Specifications">Specifications</h2>
7776

7877
<h2 id="Browser_compatibility">Browser compatibility</h2>
7978

80-
<p>{{Compat}}</p>
79+
<p>{{Compat("api.CSS", 1)}}</p>
8180

8281
<h2 id="See_also">See also</h2>
8382

files/en-us/web/api/css/registerproperty/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
- CSS
66
- Houdini
77
- Reference
8-
browser-compat: api.CSS.registerProperty
98
---
109
<div>{{SeeCompatTable}}</div>
1110

@@ -131,7 +130,7 @@ <h2 id="Specifications">Specifications</h2>
131130

132131
<h2 id="Browser_compatibility">Browser compatibility</h2>
133132

134-
<p>{{Compat}}</p>
133+
<p>{{Compat("api.CSS.registerProperty", 1)}}</p>
135134

136135
<h2 id="See_also">See also</h2>
137136

files/en-us/web/api/cssnumericvalue/sum/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
- Method
1111
- Reference
1212
- sum()
13-
browser-compat: api.CSSNumericValue.sum
1413
---
1514
<div>{{draft}}{{APIRef("CSS Typed OM")}}{{SeeCompatTable}}</div>
1615

@@ -68,4 +67,4 @@ <h2 id="Specifications">Specifications</h2>
6867

6968
<h2 id="Browser_compatibility">Browser compatibility</h2>
7069

71-
<p>{{Compat}}</p>
70+
<p>{{Compat("api.CSSNumericValue.sub")}}</p>

files/en-us/web/api/csspseudoelement/element/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
- Experimental
99
- Property
1010
- Reference
11-
browser-compat: api.CSSPseudoElement.element
1211
---
1312
<p>{{APIRef}}{{SeeCompatTable}}</p>
1413

@@ -62,7 +61,7 @@ <h2 id="Specifications">Specifications</h2>
6261

6362
<h2 id="Browser_compatibility">Browser compatibility</h2>
6463

65-
<p>{{Compat}}</p>
64+
<p>{{Compat('api.CSSPseudoElement.element')}}</p>
6665

6766
<h2 id="See_also">See also</h2>
6867

files/en-us/web/api/csspseudoelement/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
- Experimental
99
- Interface
1010
- Reference
11-
browser-compat: api.CSSPseudoElement
1211
---
1312
<p>{{APIRef}}{{SeeCompatTable}}</p>
1413

@@ -67,7 +66,7 @@ <h2 id="Specifications">Specifications</h2>
6766

6867
<h2 id="Browser_compatibility">Browser compatibility</h2>
6968

70-
<p>{{Compat}}</p>
69+
<p>{{Compat('api.CSSPseudoElement')}}</p>
7170

7271
<h2 id="See_also">See also</h2>
7372

files/en-us/web/api/csspseudoelement/type/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
- Property
99
- Reference
1010
- Type
11-
browser-compat: api.CSSPseudoElement.type
1211
---
1312
<p>{{APIRef}}{{SeeCompatTable}}</p>
1413

@@ -64,7 +63,7 @@ <h2 id="Specifications">Specifications</h2>
6463

6564
<h2 id="Browser_compatibility">Browser compatibility</h2>
6665

67-
<p>{{Compat}}</p>
66+
<p>{{Compat('api.CSSPseudoElement.type')}}</p>
6867

6968
<h2 id="See_also">See also</h2>
7069

files/en-us/web/api/csstransition/transitionproperty/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
- CSSTransition
88
- Property
99
- Reference
10-
browser-compat: api.CSSTransition.transitionProperty
1110
---
1211
<div>{{APIRef("Web Animations API")}}{{SeeCompatTable}}</div>
1312

@@ -73,4 +72,4 @@ <h2 id="Specifications">Specifications</h2>
7372

7473
<h2 id="Browser_compatibility">Browser compatibility</h2>
7574

76-
<p>{{Compat}}</p>
75+
<p>{{Compat("api.CSSAnimation.transitionProperty")}}</p>

files/en-us/web/api/document_object_model/introduction/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ <h2 id="Testing_the_DOM_API">Testing the DOM API</h2>
202202
&lt;/head&gt;
203203
&lt;body&gt;
204204
&lt;div style="margin: .5in; height: 400px;"&gt;
205+
&lt;p&gt;&lt;b&gt;&lt;code&gt;text&lt;/code&gt;&lt;/b&gt;&lt;/p&gt;
205206
&lt;form&gt;
206-
&lt;p&gt;&lt;b&gt;&lt;code&gt;text&lt;/code&gt;&lt;/b&gt;&lt;/p&gt;
207207
&lt;select onChange="setBodyAttr('text',
208208
this.options[this.selectedIndex].value);"&gt;
209209
&lt;option value="black"&gt;black&lt;/option&gt;

files/en-us/web/css/css_animations/using_css_animations/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ <h3 id="Making_text_slide_across_the_browser_window">Making text slide across th
9595
</pre>
9696

9797
<div class="notecard note">
98-
<p><strong>Note</strong>: Reload page to see the animation.</p>
98+
<p><strong>Note</strong>: Reload page to see the animation, or click the CodePen button to see the animation in the CodePen environment.</p>
9999
</div>
100100

101101
<p>{{EmbedLiveSample("Making_text_slide_across_the_browser_window","100%","250")}}</p>
@@ -145,7 +145,7 @@ <h3 id="Adding_another_keyframe">Adding another keyframe</h3>
145145
<p>This tells the browser that 75% of the way through the animation sequence, the header should have its left margin at 25% and the width should be 150%.</p>
146146

147147
<div class="notecard note">
148-
<p><strong>Note</strong>: Reload page to see the animation.</p>
148+
<p><strong>Note</strong>: Reload page to see the animation, or click the CodePen button to see the animation in the CodePen environment.</p>
149149
</div>
150150

151151
<p>{{EmbedLiveSample("Adding_another_keyframe","100%","250")}}</p>
@@ -361,7 +361,7 @@ <h4 id="The_HTML">The HTML</h4>
361361
<p>And here's the live output.</p>
362362

363363
<div class="notecard note">
364-
<p><strong>Note</strong>: Reload page to see the animation.</p>
364+
<p><strong>Note</strong>: Reload page to see the animation, or click the CodePen button to see the animation in the CodePen environment.</p>
365365
</div>
366366

367367
<p>{{EmbedLiveSample('Using_animation_events', '600', '300')}}</p>
@@ -370,6 +370,6 @@ <h2 id="See_also">See also</h2>
370370

371371
<ul>
372372
<li>{{domxref("AnimationEvent", "AnimationEvent")}}</li>
373-
<li><a href="/en-US/docs/Web/CSS/CSS_Animations/Detecting_CSS_animation_support">Detecting CSS animation support</a></li>
374-
<li><a href="/en-US/docs/Web/CSS/CSS_Transitions/Using_CSS_transitions">Using CSS transitions</a></li>
373+
<li><a href="/en-US/docs/CSS/CSS_animations/Detecting_CSS_animation_support">Detecting CSS animation support</a></li>
374+
<li><a href="/en-US/docs/Web/Guide/CSS/Using_CSS_transitions">Using CSS transitions</a></li>
375375
</ul>

files/en-us/web/http/headers/user-agent/firefox/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ <h2 id="General_form">General form</h2>
5252
<h2 id="Mobile_and_Tablet_indicators">Mobile and Tablet indicators</h2>
5353

5454
<div class="note">
55-
<p>Only from Firefox 11 to 68.</p>
55+
<p>Only from Firefox 11 onwards.</p>
5656
</div>
5757

5858
<p>The <code><var>platform</var></code> part of the UA string indicates if Firefox is running on a phone-sized or tablet device. When Firefox runs on a device that has the phone form factor, there is a <code>Mobile;</code> token in the <code><var>platform</var></code> part of the UA string. When Firefox runs on a tablet device, there is a <code>Tablet;</code> token in the <code><var>platform</var></code> part of the UA string instead. For example:</p>

files/en-us/web/javascript/reference/global_objects/object/create/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ function MyClass() {
323323
// inherit one class
324324
MyClass.prototype = Object.create(SuperClass.prototype);
325325
// mixin another
326-
Object.assign(Object.getPrototypeOf(MyClass.prototype), OtherSuperClass.prototype);
326+
Object.assign(MyClass.prototype, OtherSuperClass.prototype);
327327
// re-assign constructor
328328
MyClass.prototype.constructor = MyClass;
329329

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
title: Bitwise NOT (~)
3+
slug: Web/JavaScript/Reference/Operators/Bitwise_NOT
4+
tags:
5+
- Bitwise operator
6+
- JavaScript
7+
- Language feature
8+
- Operator
9+
- Reference
10+
browser-compat: javascript.operators.bitwise_not
11+
---
12+
<div>{{jsSidebar("Operators")}}</div>
13+
14+
<p>The bitwise NOT operator (<code>~</code>) inverts the bits of its operand.</p>
15+
16+
<div>{{EmbedInteractiveExample("pages/js/expressions-bitwise-not.html")}}</div>
17+
18+
<h2 id="Syntax">Syntax</h2>
19+
20+
<pre class="brush: js">~a
21+
</pre>
22+
23+
<h2 id="Description">Description</h2>
24+
25+
<p>The operand is converted to a 32-bit integer and expressed as a series of bits (zeroes
26+
and ones). Numbers with more than 32 bits get their most significant bits discarded. For
27+
example, the following integer, with more than 32 bits, will be converted to a 32 bit
28+
integer:</p>
29+
30+
<pre class="brush: js">Before: 11100110111110100000000000000110000000000001
31+
After: 10100000000000000110000000000001</pre>
32+
33+
<p>Each bit in the operand is inverted in the result.
34+
</p>
35+
36+
<p>The truth table for the <code>NOT</code> operation is:</p>
37+
38+
<table class="standard-table">
39+
<thead>
40+
<tr>
41+
<th class="header" scope="col">a</th>
42+
<th class="header" scope="col">NOT a</th>
43+
</tr>
44+
</thead>
45+
<tbody>
46+
<tr>
47+
<td>0</td>
48+
<td>1</td>
49+
</tr>
50+
<tr>
51+
<td>1</td>
52+
<td>0</td>
53+
</tr>
54+
</tbody>
55+
</table>
56+
57+
<pre class="brush: js"> 9 (base 10) = 00000000000000000000000000001001 (base 2)
58+
--------------------------------
59+
~9 (base 10) = 11111111111111111111111111110110 (base 2) = -10 (base 10)
60+
</pre>
61+
62+
<p>Bitwise NOTing any number <code>x</code> yields <code>-(x + 1)</code>. For example,
63+
<code>~-5</code> yields <code>4</code>.</p>
64+
65+
<p>Note that due to using 32-bit representation for numbers both <code>~-1</code> and
66+
<code>~4294967295</code> (2^32 - 1) results in <code>0</code>.</p>
67+
68+
<h2 id="Examples">Examples</h2>
69+
70+
<h3 id="Using_bitwise_NOT">Using bitwise NOT</h3>
71+
72+
<pre class="brush: js">~0; // -1
73+
~-1; // 0
74+
~1; // -2
75+
</pre>
76+
77+
<h2 id="Specifications">Specifications</h2>
78+
79+
{{Specifications}}
80+
81+
<h2 id="Browser_compatibility">Browser compatibility</h2>
82+
83+
<p>{{Compat}}</p>
84+
85+
<h2 id="See_also">See also</h2>
86+
87+
<ul>
88+
<li><a href="/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators#bitwise">Bitwise
89+
operators in the JS guide</a></li>
90+
</ul>

files/en-us/web/javascript/reference/operators/destructuring_assignment/index.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -103,21 +103,6 @@ console.log(a); // 1
103103
console.log(b); // 2
104104
```
105105

106-
In an array destructuring from an array of length <var>N</var> specified on the
107-
right-hand side of the assignment, if the number of variables specified on the
108-
left-hand side of the assignment is greater than <var>N</var>, only the first <var>N</var> variables are assigned values. The values of the remaining
109-
variables will be undefined.
110-
111-
```js
112-
const foo = ['one', 'two'];
113-
114-
const [red, yellow, green, blue] = foo;
115-
console.log(red); // "one"
116-
console.log(yellow); // "two"
117-
console.log(green); // undefined
118-
console.log(blue); //undefined
119-
```
120-
121106
#### Default values
122107

123108
A variable can be assigned a default, in the case that the value unpacked from

0 commit comments

Comments
 (0)