From 4731862a30377d4dc302dd5490d8bf4e8a695e82 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sun, 11 Sep 2022 02:07:11 -0400 Subject: [PATCH 01/14] style: run prettier on web/g-j --- .../index.md | 16 +- .../index.md | 2 +- .../index.md | 2 +- .../video_player_styling_basics/index.md | 2 +- .../audio_and_video_manipulation/index.md | 12 +- files/en-us/web/guide/houdini/index.md | 10 +- .../guide/html/constraint_validation/index.md | 8 +- .../web/guide/html/editable_content/index.md | 6 +- .../guide/mobile/a_hybrid_approach/index.md | 2 +- .../guide/mobile/mobile-friendliness/index.md | 2 +- files/en-us/web/guide/performance/index.md | 2 +- files/en-us/web/guide/printing/index.md | 4 +- .../index.md | 8 +- .../web/html/attributes/disabled/index.md | 2 +- .../web/html/attributes/readonly/index.md | 2 +- files/en-us/web/html/attributes/rel/index.md | 56 +++---- files/en-us/web/html/element/abbr/index.md | 2 +- files/en-us/web/html/element/audio/index.md | 1 + files/en-us/web/html/element/dialog/index.md | 8 +- .../html/element/heading_elements/index.md | 32 ++-- files/en-us/web/html/element/iframe/index.md | 1 + files/en-us/web/html/element/img/index.md | 8 +- .../web/html/element/input/file/index.md | 8 +- files/en-us/web/html/element/input/index.md | 2 + files/en-us/web/html/element/marquee/index.md | 4 +- .../en-us/web/html/element/meta/name/index.md | 20 +-- files/en-us/web/html/element/meter/index.md | 2 +- files/en-us/web/html/element/samp/index.md | 2 +- files/en-us/web/html/element/source/index.md | 7 + files/en-us/web/html/element/table/index.md | 2 +- files/en-us/web/html/element/thead/index.md | 2 +- files/en-us/web/html/element/title/index.md | 2 +- .../html/global_attributes/itemprop/index.md | 8 +- files/en-us/web/html/index.md | 2 +- files/en-us/web/html/inline_elements/index.md | 1 + .../identifying_resources_on_the_web/index.md | 2 +- .../mime_types/common_types/index.md | 148 +++++++++--------- .../index.md | 14 +- files/en-us/web/http/caching/index.md | 2 +- .../list_of_default_accept_values/index.md | 22 +-- .../web/http/headers/accept-encoding/index.md | 2 +- .../web/http/headers/authorization/index.md | 1 + .../http/headers/content-location/index.md | 2 +- .../headers/content-security-policy/index.md | 1 + .../content-security-policy/sandbox/index.md | 2 +- .../content-security-policy/sources/index.md | 1 + .../en-us/web/http/headers/forwarded/index.md | 1 + .../web/http/headers/max-forwards/index.md | 108 ++++++------- files/en-us/web/http/headers/origin/index.md | 1 + .../web/http/headers/referrer-policy/index.md | 44 +++--- .../sec-ch-ua-full-version-list/index.md | 2 +- .../sec-ch-ua-platform-version/index.md | 5 +- .../web/http/headers/set-cookie/index.md | 5 +- files/en-us/web/http/headers/upgrade/index.md | 10 +- files/en-us/web/http/headers/warning/index.md | 18 +-- .../http/headers/www-authenticate/index.md | 2 + .../web/http/headers/x-forwarded-for/index.md | 14 +- files/en-us/web/http/messages/index.md | 22 +-- files/en-us/web/http/methods/connect/index.md | 2 +- files/en-us/web/http/redirections/index.md | 22 +-- .../resources_and_specifications/index.md | 96 ++++++------ files/en-us/web/http/session/index.md | 4 +- files/en-us/web/http/status/502/index.md | 2 +- files/en-us/web/http/status/504/index.md | 2 +- files/en-us/web/http/status/510/index.md | 2 +- files/en-us/web/http/status/index.md | 10 +- .../web/javascript/about_javascript/index.md | 2 +- .../web/javascript/data_structures/index.md | 1 + .../index.md | 32 ++-- .../control_flow_and_error_handling/index.md | 2 +- .../guide/expressions_and_operators/index.md | 102 ++++++------ .../guide/grammar_and_types/index.md | 30 ++-- .../guide/iterators_and_generators/index.md | 2 +- .../guide/numbers_and_dates/index.md | 46 +++--- .../javascript/guide/text_formatting/index.md | 2 +- .../index.md | 2 +- .../index.md | 2 +- .../deprecated_and_obsolete_features/index.md | 44 +++--- .../reference/errors/bad_regexp_flag/index.md | 2 +- .../errors/illegal_character/index.md | 4 +- .../reference/errors/malformed_uri/index.md | 2 +- .../index.md | 2 +- .../index.md | 2 +- .../javascript/reference/functions/index.md | 4 +- .../aggregateerror/aggregateerror/index.md | 2 +- .../global_objects/array/foreach/index.md | 5 +- .../global_objects/array/group/index.md | 5 +- .../global_objects/array/grouptomap/index.md | 5 +- .../global_objects/array/lastindexof/index.md | 1 + .../global_objects/array/reduce/index.md | 4 +- .../global_objects/array/reduceright/index.md | 4 +- .../global_objects/array/sort/index.md | 10 +- .../global_objects/array/splice/index.md | 1 + .../global_objects/asyncfunction/index.md | 3 +- .../asyncgeneratorfunction/index.md | 2 +- .../atomics/compareexchange/index.md | 2 +- .../bigint/tolocalestring/index.md | 3 + .../global_objects/date/date/index.md | 1 + .../global_objects/date/now/index.md | 2 +- .../date/tolocaledatestring/index.md | 3 + .../date/tolocalestring/index.md | 3 + .../date/tolocaletimestring/index.md | 3 + .../global_objects/date/utc/index.md | 4 +- .../global_objects/error/error/index.md | 4 +- .../reference/global_objects/error/index.md | 2 + .../reference/global_objects/eval/index.md | 128 +++++++-------- .../evalerror/evalerror/index.md | 2 +- .../global_objects/generator/return/index.md | 1 + .../global_objects/generator/throw/index.md | 1 + .../internalerror/internalerror/index.md | 2 +- .../intl/collator/collator/index.md | 8 +- .../datetimeformat/datetimeformat/index.md | 4 +- .../intl/displaynames/displaynames/index.md | 3 +- .../intl/listformat/listformat/index.md | 6 +- .../intl/numberformat/format/index.md | 2 +- .../intl/numberformat/formatrange/index.md | 1 + .../numberformat/formatrangetoparts/index.md | 1 + .../intl/numberformat/numberformat/index.md | 23 +-- .../intl/segmenter/segmenter/index.md | 2 +- .../intl/segments/@@iterator/index.md | 2 +- .../intl/segments/containing/index.md | 2 +- .../intl/supportedvaluesof/index.md | 2 +- .../global_objects/json/stringify/index.md | 2 + .../global_objects/number/number/index.md | 2 +- .../number/tolocalestring/index.md | 3 + .../object/defineproperty/index.md | 2 +- .../object/isprototypeof/index.md | 3 +- .../global_objects/promise/then/index.md | 2 +- .../global_objects/proxy/proxy/get/index.md | 2 +- .../rangeerror/rangeerror/index.md | 2 +- .../referenceerror/referenceerror/index.md | 2 +- .../reference/global_objects/reflect/index.md | 2 +- .../global_objects/regexp/@@matchall/index.md | 2 +- .../global_objects/regexp/exec/index.md | 5 +- .../reference/global_objects/string/index.md | 26 +-- .../string/localecompare/index.md | 3 + .../global_objects/string/replace/index.md | 2 +- .../global_objects/string/replaceall/index.md | 2 + .../syntaxerror/syntaxerror/index.md | 2 +- .../global_objects/typedarray/filter/index.md | 2 + .../typedarray/foreach/index.md | 2 +- .../global_objects/typedarray/index.md | 30 ++-- .../global_objects/typedarray/some/index.md | 2 +- .../typeerror/typeerror/index.md | 2 +- .../global_objects/urierror/urierror/index.md | 2 +- .../compileerror/compileerror/index.md | 2 +- .../webassembly/exception/exception/index.md | 2 +- .../webassembly/exception/index.md | 1 + .../webassembly/linkerror/linkerror/index.md | 2 +- .../runtimeerror/runtimeerror/index.md | 2 +- .../global_objects/webassembly/table/index.md | 2 +- .../webassembly/table/table/index.md | 2 +- .../webassembly/tag/tag/index.md | 1 + .../reference/iteration_protocols/index.md | 2 + .../operators/async_function_star_/index.md | 2 +- .../reference/operators/equality/index.md | 24 +-- .../reference/operators/new/index.md | 22 +-- .../reference/operators/yield_star_/index.md | 2 +- .../statements/async_function/index.md | 26 +-- .../reference/statements/do...while/index.md | 2 + .../reference/statements/for/index.md | 2 + .../transitioning_to_strict_mode/index.md | 12 +- .../web/javascript/typed_arrays/index.md | 26 +-- 163 files changed, 836 insertions(+), 763 deletions(-) diff --git a/files/en-us/web/guide/ajax/wai_aria_live_regions_api_support/index.md b/files/en-us/web/guide/ajax/wai_aria_live_regions_api_support/index.md index 8009032c64e3ad9..2e3c76899b0a12b 100644 --- a/files/en-us/web/guide/ajax/wai_aria_live_regions_api_support/index.md +++ b/files/en-us/web/guide/ajax/wai_aria_live_regions_api_support/index.md @@ -33,14 +33,14 @@ As always, we're open to questions and suggestions for changes in [community for For any mutation event in a page, the author can get the following object attributes from the event object, if they are defined on some ancestor element (closest ancestor wins): -| Object attribute name | Possible values | Default value | ARIA markup if required | Meaning | -| --------------------- | --------------------------------------------- | -------------------| ------------------------------------|----------------- | -| `container-live` | `"off" \| "polite" \| "assertive"` | `"off"` | `aria-live` on ancestor element | Interruption | -| `container-relevant` | `'additions'` `'removals'` `'text' \| "all"` | `"additions text"` | `aria-relevant` on ancestor element | What types of mutations are possibly relevant? See [section](#events_fired_for_web_page_mutations_the_mutation_events_list) to match the type of event with this attribute's value, to determine whether the author believed the event should be presented to the user or not.| -| `container-busy` | `"true" \| "false" \| "error"` | `"false"` | `aria-busy` on ancestor element | The current changes are not yet complete. A state change event for the A11y API's BUSY state will be fired on the container object currently marked as BUSY, once it is no longer BUSY. This is especially important in atomic regions. The entire atomic region should be presented once when it is finally no longer BUSY.| -| `container-atomic` | `"true" \| "false"` | `"false"` | `aria-atomic` on ancestor element | Is this change inside a region that should always be presented at once. If yes, member-of relation will point to the root of the region (see next section)| -| `member-of` | If `container-atomic=true`, points to an ancestor accessible object (thus it is actually an accessible relation, not object attribute) | Not in atomic region if not provided | `aria-atomic` on ancestor element | Points to the root of the atomic container that this object is in. This will always be an ancestor of the current object. | -| `event-from-input` | `"true" \| "false"` (described more below) | Browser could not calculate this | Does not require author's cooperation. | Was the root cause of this event explicit user input? | +| Object attribute name | Possible values | Default value | ARIA markup if required | Meaning | +| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `container-live` | `"off" \| "polite" \| "assertive"` | `"off"` | `aria-live` on ancestor element | Interruption | +| `container-relevant` | `'additions'` `'removals'` `'text' \| "all"` | `"additions text"` | `aria-relevant` on ancestor element | What types of mutations are possibly relevant? See [section](#events_fired_for_web_page_mutations_the_mutation_events_list) to match the type of event with this attribute's value, to determine whether the author believed the event should be presented to the user or not. | +| `container-busy` | `"true" \| "false" \| "error"` | `"false"` | `aria-busy` on ancestor element | The current changes are not yet complete. A state change event for the A11y API's BUSY state will be fired on the container object currently marked as BUSY, once it is no longer BUSY. This is especially important in atomic regions. The entire atomic region should be presented once when it is finally no longer BUSY. | +| `container-atomic` | `"true" \| "false"` | `"false"` | `aria-atomic` on ancestor element | Is this change inside a region that should always be presented at once. If yes, member-of relation will point to the root of the region (see next section) | +| `member-of` | If `container-atomic=true`, points to an ancestor accessible object (thus it is actually an accessible relation, not object attribute) | Not in atomic region if not provided | `aria-atomic` on ancestor element | Points to the root of the atomic container that this object is in. This will always be an ancestor of the current object. | +| `event-from-input` | `"true" \| "false"` (described more below) | Browser could not calculate this | Does not require author's cooperation. | Was the root cause of this event explicit user input? | The "container-" prefix is so named because the attribute describes what the final computed property of similar name is for that node. This means that the AT does not need to traverse up the parent chain to get this information. At this time, for properties where the `container-`_name_ attribute has not been set, the AT must have code to fall back on the default value as defined in the W3C spec. diff --git a/files/en-us/web/guide/api/webrtc/peer-to-peer_communications_with_webrtc/index.md b/files/en-us/web/guide/api/webrtc/peer-to-peer_communications_with_webrtc/index.md index c568818c4ca6498..463e048155f1e3c 100644 --- a/files/en-us/web/guide/api/webrtc/peer-to-peer_communications_with_webrtc/index.md +++ b/files/en-us/web/guide/api/webrtc/peer-to-peer_communications_with_webrtc/index.md @@ -26,7 +26,7 @@ A high-level description of what happens in an `RTCPeerConnection` was shown in ## Resources -- A good tutorial on basic features in WebRTC is at [web.dev](https://web.dev/webrtc-basics/). A collection of basic test pages to support development are at [webrtc-landing](https://mozilla.github.io/webrtc-landing/). +- A good tutorial on basic features in WebRTC is at [web.dev](https://web.dev/webrtc-basics/). A collection of basic test pages to support development are at [webrtc-landing](https://mozilla.github.io/webrtc-landing/). - You can make simple person-to-person calls using [apprtc](https://github.com/webrtc/apprtc). - A high-level description of what happens in an `RTCPeerConnection` was shown in the [Mozilla Hacks](https://hacks.mozilla.org/category/webrtc/) blog article [Embedding WebRTC video chat](https://hacks.mozilla.org/2013/05/embedding-webrtc-video-chat-right-into-your-website/). diff --git a/files/en-us/web/guide/audio_and_video_delivery/live_streaming_web_audio_and_video/index.md b/files/en-us/web/guide/audio_and_video_delivery/live_streaming_web_audio_and_video/index.md index cf26f2120595bdf..781c5b69b5f34b4 100644 --- a/files/en-us/web/guide/audio_and_video_delivery/live_streaming_web_audio_and_video/index.md +++ b/files/en-us/web/guide/audio_and_video_delivery/live_streaming_web_audio_and_video/index.md @@ -70,7 +70,7 @@ For example: [Media Source Extensions](https://w3c.github.io/media-source/) is a W3C working draft that plans to extend {{ domxref("HTMLMediaElement") }} to allow JavaScript to generate media streams for playback. Allowing JavaScript to generate streams facilitates a variety of use cases like adaptive streaming and time shifting live streams. -For example, [you could implement MPEG-DASH using JavaScript while offloading the decoding to MSE](https://web.archive.org/web/20170504035455/https://msopentech.com/blog/2014/01/03/streaming_video_player/). +For example, [you could implement MPEG-DASH using JavaScript while offloading the decoding to MSE](https://web.archive.org/web/20170504035455/https://msopentech.com/blog/2014/01/03/streaming_video_player/). > **Note:** Time Shifting is the process of consuming a live stream sometime after it happened. diff --git a/files/en-us/web/guide/audio_and_video_delivery/video_player_styling_basics/index.md b/files/en-us/web/guide/audio_and_video_delivery/video_player_styling_basics/index.md index bfb5f6ae948a699..135e4f119e3592e 100644 --- a/files/en-us/web/guide/audio_and_video_delivery/video_player_styling_basics/index.md +++ b/files/en-us/web/guide/audio_and_video_delivery/video_player_styling_basics/index.md @@ -205,7 +205,7 @@ As mentioned in the [previous article](/en-US/docs/Web/Guide/Audio_and_video_del } ``` -A `.data-state` class is also used here when a {{ htmlelement("progress") }} element is being "faked"; when it's in this state the background color needs to be set. The internal {{htmlelement("span") }} element used as the actual progressing part of the faked progress bar has its width initially set to 0% (it is updated via JavaScript) and it also has its background color set. +A `.data-state` class is also used here when a {{ htmlelement("progress") }} element is being "faked"; when it's in this state the background color needs to be set. The internal {{htmlelement("span") }} element used as the actual progressing part of the faked progress bar has its width initially set to 0% (it is updated via JavaScript) and it also has its background color set. There are some browser-specific properties that need to be set to ensure that Firefox and Chrome use the required color for the progress bar: diff --git a/files/en-us/web/guide/audio_and_video_manipulation/index.md b/files/en-us/web/guide/audio_and_video_manipulation/index.md index 6414c92803eb735..2c5d7e57e40dbd1 100644 --- a/files/en-us/web/guide/audio_and_video_manipulation/index.md +++ b/files/en-us/web/guide/audio_and_video_manipulation/index.md @@ -189,12 +189,12 @@ window.addEventListener('load', setPlaybackRate); The Web Audio API can receive audio from a variety of sources, then process it and send it back out to an {{domxref("AudioDestinationNode")}} representing the output device to which the sound is sent after processing. -| If the audio source is… | Use this Web Audio node type | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------- | -| An audio track from an HTML {{HTMLElement("audio")}} or {{HTMLElement("video")}} element | {{domxref("MediaElementAudioSourceNode")}} | -| A plain raw audio data buffer in memory | {{domxref("AudioBufferSourceNode")}} | -| An oscillator generating a sine wave or other computed waveform | {{domxref("OscillatorNode")}} | -| An audio track from [WebRTC](/en-US/docs/Web/API/WebRTC_API) (such as the microphone input you can get using {{domxref("MediaDevices.getUserMedia", "getUserMedia()")}}. | {{domxref("MediaStreamAudioSourceNode")}} | +| If the audio source is… | Use this Web Audio node type | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------ | +| An audio track from an HTML {{HTMLElement("audio")}} or {{HTMLElement("video")}} element | {{domxref("MediaElementAudioSourceNode")}} | +| A plain raw audio data buffer in memory | {{domxref("AudioBufferSourceNode")}} | +| An oscillator generating a sine wave or other computed waveform | {{domxref("OscillatorNode")}} | +| An audio track from [WebRTC](/en-US/docs/Web/API/WebRTC_API) (such as the microphone input you can get using {{domxref("MediaDevices.getUserMedia", "getUserMedia()")}}. | {{domxref("MediaStreamAudioSourceNode")}} | ### Audio filters diff --git a/files/en-us/web/guide/houdini/index.md b/files/en-us/web/guide/houdini/index.md index 49c720a305c4a9c..7b10f52ff1e6611 100644 --- a/files/en-us/web/guide/houdini/index.md +++ b/files/en-us/web/guide/houdini/index.md @@ -46,11 +46,11 @@ which register completely configurable worklets. > **Note:** You can write your own worklets, or install components created by other people. > The [Houdini.how](https://houdini.how/) website is a collection of worklets, > with [instructions on how to use them](https://houdini.how/usage/). -The CSS `paint()` function is an additional function supported by the {{cssxref("image")}} type. -It takes parameters that include the name of the worklet, -plus additional parameters needed by the worklet. -The worklet also has access to the element's custom properties: -they don't need to be passed as function arguments. +> The CSS `paint()` function is an additional function supported by the {{cssxref("image")}} type. +> It takes parameters that include the name of the worklet, +> plus additional parameters needed by the worklet. +> The worklet also has access to the element's custom properties: +> they don't need to be passed as function arguments. In the following example the `paint()` function is passed a worklet called `myComponent`. diff --git a/files/en-us/web/guide/html/constraint_validation/index.md b/files/en-us/web/guide/html/constraint_validation/index.md index ddb873ea3c06d3e..e63c7ff8be40724 100644 --- a/files/en-us/web/guide/html/constraint_validation/index.md +++ b/files/en-us/web/guide/html/constraint_validation/index.md @@ -26,10 +26,10 @@ In HTML, basic constraints are declared in two ways: The intrinsic constraints for the {{ htmlattrxref("type", "input") }} attribute are: -| Input type | Constraint description | Associated violation | -| ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -| [``](/en-US/docs/Web/HTML/Element/input/url) | The value must be an absolute [URL](/en-US/docs/Learn/Common_questions/What_is_a_URL), as defined in the [URL Living Standard](https://url.spec.whatwg.org/). | **[TypeMismatch](/en-US/docs/Web/API/ValidityState/typeMismatch)** constraint violation | -| [``](/en-US/docs/Web/HTML/Element/input/email) | The value must be a syntactically valid email address, which generally has the format `username@hostname.tld` but can also be local such as `username@hostname`. | **[TypeMismatch](/en-US/docs/Web/API/ValidityState/typeMismatch)** constraint violation | +| Input type | Constraint description | Associated violation | +| ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| [``](/en-US/docs/Web/HTML/Element/input/url) | The value must be an absolute [URL](/en-US/docs/Learn/Common_questions/What_is_a_URL), as defined in the [URL Living Standard](https://url.spec.whatwg.org/). | **[TypeMismatch](/en-US/docs/Web/API/ValidityState/typeMismatch)** constraint violation | +| [``](/en-US/docs/Web/HTML/Element/input/email) | The value must be a syntactically valid email address, which generally has the format `username@hostname.tld` but can also be local such as `username@hostname`. | **[TypeMismatch](/en-US/docs/Web/API/ValidityState/typeMismatch)** constraint violation | For both of these input types, if the {{ htmlattrxref("multiple", "input") }} attribute is set, several values can be set, as a comma-separated list. If any of these do not satisfy the condition described here, the **Type mismatch** constraint violation is triggered. diff --git a/files/en-us/web/guide/html/editable_content/index.md b/files/en-us/web/guide/html/editable_content/index.md index 6d823550a662a41..4098c576cc2e5cb 100644 --- a/files/en-us/web/guide/html/editable_content/index.md +++ b/files/en-us/web/guide/html/editable_content/index.md @@ -80,7 +80,7 @@ user_pref("capability.policy.allowclipboard.Clipboard.paste", "allAccess"); - + Rich Text Editor