Skip to content

Commit

Permalink
Merge branch 'main' into Content-scripts-access-to-getCoalescedEvents
Browse files Browse the repository at this point in the history
  • Loading branch information
rebloor authored Sep 13, 2024
2 parents 26da92b + 3994f73 commit d2d63bc
Show file tree
Hide file tree
Showing 165 changed files with 2,342 additions and 769 deletions.
3 changes: 3 additions & 0 deletions .vscode/ignore-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,7 @@ Digi
Digianswer
dignissim
Dijit
dimoulis
dinocons
dinodescr
Dinos
Expand Down Expand Up @@ -1663,6 +1664,7 @@ Freecodecamp
Freemium
Freetype
Freitag
Frida
fringilla
fringille
fromcharcode
Expand Down Expand Up @@ -2368,6 +2370,7 @@ JXON
Kadir
Kadlec
kaios
Kahlo
Kakao
Kaku
Kaply
Expand Down
1 change: 1 addition & 0 deletions files/en-us/_redirects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11660,6 +11660,7 @@
/en-US/docs/Web/CSS/linear-gradient() /en-US/docs/Web/CSS/gradient/linear-gradient
/en-US/docs/Web/CSS/margin-new /en-US/docs/Web/CSS/margin
/en-US/docs/Web/CSS/margin_collapsing /en-US/docs/Web/CSS/CSS_box_model/Mastering_margin_collapsing
/en-US/docs/Web/CSS/masonry-auto-flow /en-US/docs/Web/CSS/grid-auto-flow
/en-US/docs/Web/CSS/max() /en-US/docs/Web/CSS/max
/en-US/docs/Web/CSS/media /en-US/docs/Web/CSS/@media
/en-US/docs/Web/CSS/media/Bitmap /en-US/docs/Web/CSS/@media
Expand Down
4 changes: 0 additions & 4 deletions files/en-us/_wikihistory.json
Original file line number Diff line number Diff line change
Expand Up @@ -86802,10 +86802,6 @@
"Heycam"
]
},
"Web/CSS/masonry-auto-flow": {
"modified": "2020-11-12T04:50:46.255Z",
"contributors": ["rachelandrew", "chrisdavidmills"]
},
"Web/CSS/math-style": {
"modified": "2020-12-12T22:36:34.292Z",
"contributors": ["sideshowbarker", "chrisdavidmills", "rachelandrew"]
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/glossary/throttle/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ page-type: glossary-definition

Throttling is very similar to {{glossary("debounce", "debouncing")}}. The key difference is that when invocations happen continuously, throttling ensures that the operation is still performed at a certain maximum rate, while debouncing waits indefinitely until the invocations stop for a certain amount of time.

A typical use case of debouncing is when synchronizing with another constantly-updating state. Consider a function `onScrolled`, which listens for the [`scroll`](/en-US/docs/Web/API/Document/scroll_event) event. The `scroll` event may fire as often as every pixel scrolled, so the function will be called in very short intervals. If `onScrolled` is computationally expensive, earlier invocations might block later invocations from happening on time, or block other things from executing in the meantime, leading to a noticeable {{glossary("jank")}}. In this case, we can throttle `onScrolled`, such that it can only be called at most once every 10 milliseconds:
A typical use case of throttling is when synchronizing with another constantly-updating state. Consider a function `onScrolled`, which listens for the [`scroll`](/en-US/docs/Web/API/Document/scroll_event) event. The `scroll` event may fire as often as every pixel scrolled, so the function will be called in very short intervals. If `onScrolled` is computationally expensive, earlier invocations might block later invocations from happening on time, or block other things from executing in the meantime, leading to a noticeable {{glossary("jank")}}. In this case, we can throttle `onScrolled`, such that it can only be called at most once every 10 milliseconds:

1. The first call to `onScrolled` is known as the _leading edge_.
2. For every next call to `onScrolled`, if it is within 10 milliseconds from the first call, it is in the same "batch" as the first call.
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/learn/performance/why_web_performance/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ As an example, consider the loading experience of CNN.com, which at the time of

- Imagine loading this on a desktop computer connected to a fibre optic network. This would seem relatively fast, and the file size would be largely irrelevant.
- Imagine loading that same site using tethered mobile data on a nine-year-old iPad while commuting home on public transportation. The same site will be slow to load, possibly verging on unusable depending on cell coverage. You might give up before it finishes loading.
- Imagine loading that same site on a $35 Huawei device in a rural India with limited coverage or no coverage. The site will be very slow to load—if it loads at all—with blocking scripts possibly timing out, and adverse CPU impact causing browser crashes if it does load.
- Imagine loading that same site on a low-cost device in an area with limited coverage. The site will be very slow to load—if it loads at all—with blocking scripts possibly timing out, and adverse CPU impact potentially causing browser crashes if it does load.

A 22.6 MB site could take up to 83 seconds to load on a 3G network, with [`DOMContentLoaded`](/en-US/docs/Web/API/Document/DOMContentLoaded_event) (meaning the site's base HTML structure) at 31.86 seconds.

And it isn't just the time taken to download that is a major problem. A lot of countries still have internet connections that bill per megabyte. Our example 22.6 MB CNN.com experience would cost about 11% of the average Indian's daily wage to download. From a mobile device in Northwest Africa, it might cost two days of an average salary. And if this site were loaded on a US carrier's international roaming plan? The costs would make anyone cry. (See [how much your site costs to download](https://whatdoesmysitecost.com/).)
And it isn't just the time taken to download that is a major problem. In some regions, internet connections are billed per megabyte, making large downloads prohibitively expensive. Our example 22.6 MB CNN.com experience would cost a significant portion of a mobile data user's daily allowance or even lead to high charges in certain international roaming plans.(See [how much your site costs to download](https://whatdoesmysitecost.com/).)

### Improve conversion rates

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ A number of other concrete steps you can take are:
- Keep track of the most popular threats (the [current OWASP list is here](https://owasp.org/www-project-top-ten/)) and address the most common vulnerabilities first.
- Use [vulnerability scanning tools](https://owasp.org/www-community/Vulnerability_Scanning_Tools) to perform automated security testing on your site. Later on, your very successful website may also find bugs by offering a bug bounty [like Mozilla does here](https://www.mozilla.org/en-US/security/bug-bounty/faq-webapp/).
- Only store and display data that you need. For example, if your users must store sensitive information like credit card details, only display enough of the card number that it can be identified by the user, and not enough that it can be copied by an attacker and used on another site. The most common pattern at this time is to only display the last 4 digits of a credit card number.
- Keep software up-to-date.
Most servers have regular security updates that fix or mitigate known vulnerabilities.
If possible, schedule regular automated updates, and ideally, schedule updates during times when your website has the lowest amount of traffic.
It's best to back up your data before updating and test new software versions to make sure there's no compatibility issues on your server.

Web frameworks can help mitigate many of the more common vulnerabilities.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function listener(details) {
let str = decoder.decode(event.data, { stream: true });
// Just change any instance of Example in the HTTP response
// to WebExtension Example.
str = str.replace(/Example/g, "WebExtension Example");
str = str.replaceAll("Example", "WebExtension Example");
filter.write(encoder.encode(str));
filter.disconnect();
};
Expand Down
1 change: 1 addition & 0 deletions files/en-us/mozilla/firefox/releases/131/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ This article provides information about the changes in Firefox 131 that affect d

### APIs

- The {{domxref('PointerEvent.altitudeAngle','altitudeAngle')}} and {{domxref('PointerEvent.azimuthAngle','azimuthAngle')}} properties of the {{domxref('PointerEvent')}} interface are supported, providing the angle between the pointer/stylus and the screen (X-Y plane), and the rotation of the stylus over the screen relative to its x-axis, respectively. ([Firefox bug 1909673](https://bugzil.la/1909673)).
- [Text fragments](/en-US/docs/Web/URI/Fragment/Text_fragments) are now supported, allowing users to link to and highlight specific portions of text in a web page. This feature uses a particular syntax in the [URL fragment](/en-US/docs/Web/URI/Fragment) that identifies the target based on patterns in the rendered text.
Website developers can also use the existence of the {{domxref("Document.fragmentDirective")}} property (an instance of the {{domxref("FragmentDirective")}} interface) to feature check for text fragment support, and the {{CSSxRef("::target-text")}} pseudo element to select and style text that has been selected using a text fragment link. ([Firefox bug 1914877](https://bugzil.la/1914877))

Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/audiodata/allocationsize/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ title: "AudioData: allocationSize() method"
short-title: allocationSize()
slug: Web/API/AudioData/allocationSize
page-type: web-api-instance-method
status:
- experimental
browser-compat: api.AudioData.allocationSize
---

{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}{{SeeCompatTable}}
{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}

The **`allocationSize()`** method of the {{domxref("AudioData")}} interface returns the size in bytes required to hold the current sample as filtered by options passed into the method.

Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/audiodata/audiodata/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ title: "AudioData: AudioData() constructor"
short-title: AudioData()
slug: Web/API/AudioData/AudioData
page-type: web-api-constructor
status:
- experimental
browser-compat: api.AudioData.AudioData
---

{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}{{SeeCompatTable}}
{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}

The **`AudioData()`** constructor creates a new {{domxref("AudioData")}} object which represents an individual audio sample.

Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/audiodata/clone/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ title: "AudioData: clone() method"
short-title: clone()
slug: Web/API/AudioData/clone
page-type: web-api-instance-method
status:
- experimental
browser-compat: api.AudioData.clone
---

{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}{{SeeCompatTable}}
{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}

The **`clone()`** method of the {{domxref("AudioData")}} interface creates a new `AudioData` object with reference to the same media resource as the original.

Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/audiodata/close/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ title: "AudioData: close() method"
short-title: close()
slug: Web/API/AudioData/close
page-type: web-api-instance-method
status:
- experimental
browser-compat: api.AudioData.close
---

{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}{{SeeCompatTable}}
{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}

The **`close()`** method of the {{domxref("AudioData")}} interface clears all states and releases the reference to the media resource.

Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/audiodata/copyto/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ title: "AudioData: copyTo() method"
short-title: copyTo()
slug: Web/API/AudioData/copyTo
page-type: web-api-instance-method
status:
- experimental
browser-compat: api.AudioData.copyTo
---

{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}{{SeeCompatTable}}
{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}

The **`copyTo()`** method of the {{domxref("AudioData")}} interface copies a plane of an `AudioData` object to a destination buffer.

Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/audiodata/duration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ title: "AudioData: duration property"
short-title: duration
slug: Web/API/AudioData/duration
page-type: web-api-instance-property
status:
- experimental
browser-compat: api.AudioData.duration
---

{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}{{SeeCompatTable}}
{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}

The **`duration`** read-only property of the {{domxref("AudioData")}} interface returns the duration in microseconds of this `AudioData` object.

Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/audiodata/format/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ title: "AudioData: format property"
short-title: format
slug: Web/API/AudioData/format
page-type: web-api-instance-property
status:
- experimental
browser-compat: api.AudioData.format
---

{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}{{SeeCompatTable}}
{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}

The **`format`** read-only property of the {{domxref("AudioData")}} interface returns the sample format of the `AudioData` object.

Expand Down
26 changes: 12 additions & 14 deletions files/en-us/web/api/audiodata/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
title: AudioData
slug: Web/API/AudioData
page-type: web-api-interface
status:
- experimental
browser-compat: api.AudioData
---

{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}{{SeeCompatTable}}
{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}

The **`AudioData`** interface of the [WebCodecs API](/en-US/docs/Web/API/WebCodecs_API) represents an audio sample.

Expand All @@ -32,33 +30,33 @@ In planar format, the number of planes is equal to {{domxref("AudioData.numberOf

## Constructor

- {{domxref("AudioData.AudioData", "AudioData()")}} {{Experimental_Inline}}
- {{domxref("AudioData.AudioData", "AudioData()")}}
- : Creates a new `AudioData` object.

## Instance properties

- {{domxref("AudioData.format")}} {{ReadOnlyInline}} {{Experimental_Inline}}
- {{domxref("AudioData.format")}} {{ReadOnlyInline}}
- : Returns the sample format of the audio.
- {{domxref("AudioData.sampleRate")}} {{ReadOnlyInline}} {{Experimental_Inline}}
- {{domxref("AudioData.sampleRate")}} {{ReadOnlyInline}}
- : Returns the sample rate of the audio in Hz.
- {{domxref("AudioData.numberOfFrames")}} {{ReadOnlyInline}} {{Experimental_Inline}}
- {{domxref("AudioData.numberOfFrames")}} {{ReadOnlyInline}}
- : Returns the number of frames.
- {{domxref("AudioData.numberOfChannels")}} {{ReadOnlyInline}} {{Experimental_Inline}}
- {{domxref("AudioData.numberOfChannels")}} {{ReadOnlyInline}}
- : Returns the number of audio channels.
- {{domxref("AudioData.duration")}} {{ReadOnlyInline}} {{Experimental_Inline}}
- {{domxref("AudioData.duration")}} {{ReadOnlyInline}}
- : Returns the duration of the audio in microseconds.
- {{domxref("AudioData.timestamp")}} {{ReadOnlyInline}} {{Experimental_Inline}}
- {{domxref("AudioData.timestamp")}} {{ReadOnlyInline}}
- : Returns the timestamp of the audio in microseconds.

## Instance methods

- {{domxref("AudioData.allocationSize()")}} {{Experimental_Inline}}
- {{domxref("AudioData.allocationSize()")}}
- : Returns the number of bytes required to hold the sample as filtered by options passed into the method.
- {{domxref("AudioData.copyTo()")}} {{Experimental_Inline}}
- {{domxref("AudioData.copyTo()")}}
- : Copies the samples from the specified plane of the `AudioData` object to the destination.
- {{domxref("AudioData.clone()")}} {{Experimental_Inline}}
- {{domxref("AudioData.clone()")}}
- : Creates a new `AudioData` object with reference to the same media resource as the original.
- {{domxref("AudioData.close()")}} {{Experimental_Inline}}
- {{domxref("AudioData.close()")}}
- : Clears all states and releases the reference to the media resource.

## Specifications
Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/audiodata/numberofchannels/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ title: "AudioData: numberOfChannels property"
short-title: numberOfChannels
slug: Web/API/AudioData/numberOfChannels
page-type: web-api-instance-property
status:
- experimental
browser-compat: api.AudioData.numberOfChannels
---

{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}{{SeeCompatTable}}
{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}

The **`numberOfChannels`** read-only property of the {{domxref("AudioData")}} interface returns the number of channels in the `AudioData` object.

Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/audiodata/numberofframes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ title: "AudioData: numberOfFrames property"
short-title: numberOfFrames
slug: Web/API/AudioData/numberOfFrames
page-type: web-api-instance-property
status:
- experimental
browser-compat: api.AudioData.numberOfFrames
---

{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}{{SeeCompatTable}}
{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}

The **`numberOfFrames`** read-only property of the {{domxref("AudioData")}} interface returns the number of frames in the `AudioData` object.

Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/audiodata/samplerate/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ title: "AudioData: sampleRate property"
short-title: sampleRate
slug: Web/API/AudioData/sampleRate
page-type: web-api-instance-property
status:
- experimental
browser-compat: api.AudioData.sampleRate
---

{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}{{SeeCompatTable}}
{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}

The **`sampleRate`** read-only property of the {{domxref("AudioData")}} interface returns the sample rate in Hz.

Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/audiodata/timestamp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ title: "AudioData: timestamp property"
short-title: timestamp
slug: Web/API/AudioData/timestamp
page-type: web-api-instance-property
status:
- experimental
browser-compat: api.AudioData.timestamp
---

{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}{{SeeCompatTable}}
{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}

The **`timestamp`** read-only property of the {{domxref("AudioData")}} interface returns the timestamp of this `AudioData` object.

Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/audiodecoder/audiodecoder/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ title: "AudioDecoder: AudioDecoder() constructor"
short-title: AudioDecoder()
slug: Web/API/AudioDecoder/AudioDecoder
page-type: web-api-constructor
status:
- experimental
browser-compat: api.AudioDecoder.AudioDecoder
---

{{securecontext_header}}{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}{{SeeCompatTable}}
{{securecontext_header}}{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}

The **`AudioDecoder()`** constructor creates a new {{domxref("AudioDecoder")}} object with the provided `init.output` callback assigned as the output callback, the provided `init.error` callback as the error callback, and the {{domxref("AudioDecoder.state")}} set to `"unconfigured"`.

Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/audiodecoder/close/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ title: "AudioDecoder: close() method"
short-title: close()
slug: Web/API/AudioDecoder/close
page-type: web-api-instance-method
status:
- experimental
browser-compat: api.AudioDecoder.close
---

{{securecontext_header}}{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}{{SeeCompatTable}}
{{securecontext_header}}{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}

The **`close()`** method of the {{domxref("AudioDecoder")}} interface ends all pending work and releases system resources.

Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/audiodecoder/configure/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ title: "AudioDecoder: configure() method"
short-title: configure()
slug: Web/API/AudioDecoder/configure
page-type: web-api-instance-method
status:
- experimental
browser-compat: api.AudioDecoder.configure
---

{{securecontext_header}}{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}{{SeeCompatTable}}
{{securecontext_header}}{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}

The **`configure()`** method of the {{domxref("AudioDecoder")}} interface enqueues a control message to configure the audio decoder for decoding chunks.

Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/audiodecoder/decode/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ title: "AudioDecoder: decode() method"
short-title: decode()
slug: Web/API/AudioDecoder/decode
page-type: web-api-instance-method
status:
- experimental
browser-compat: api.AudioDecoder.decode
---

{{securecontext_header}}{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}{{SeeCompatTable}}
{{securecontext_header}}{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}

The **`decode()`** method of the {{domxref("AudioDecoder")}} interface enqueues a control message to decode a given chunk of audio.

Expand Down
4 changes: 1 addition & 3 deletions files/en-us/web/api/audiodecoder/decodequeuesize/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ title: "AudioDecoder: decodeQueueSize property"
short-title: decodeQueueSize
slug: Web/API/AudioDecoder/decodeQueueSize
page-type: web-api-instance-property
status:
- experimental
browser-compat: api.AudioDecoder.decodeQueueSize
---

{{securecontext_header}}{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}{{SeeCompatTable}}
{{securecontext_header}}{{APIRef("WebCodecs API")}}{{AvailableInWorkers("window_and_dedicated")}}

The **`decodeQueueSize`** read-only property of the {{domxref("AudioDecoder")}} interface returns the number of pending decode requests in the queue.

Expand Down
Loading

0 comments on commit d2d63bc

Please sign in to comment.