Skip to content

Commit

Permalink
Merge branch 'main' into 36117-Ship-Regular-Expression-Pattern-Modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
dletorey authored Oct 25, 2024
2 parents 749d220 + 27e8f6c commit 72c1e6c
Show file tree
Hide file tree
Showing 328 changed files with 2,714 additions and 1,695 deletions.
4 changes: 4 additions & 0 deletions .vscode/ignore-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ addevent
addeventlistener
addgamepad
Addis
addpipe
addressbar
addsourcebuffer
addstream
Expand Down Expand Up @@ -239,6 +240,7 @@ APPCOMMAND
appcontent
Appelquist
appinstalled
Appium
applicationcache
appname
appshell
Expand Down Expand Up @@ -2009,6 +2011,7 @@ hexdigit
Hextris
Heydings
Heydon
heydonworks
HHMM
Hickson's
Hidde
Expand Down Expand Up @@ -3856,6 +3859,7 @@ protan
protanomaly
PROTO
Proxied
proxified
proxify
proxyfied
proxyhandler
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 @@ -10118,6 +10118,7 @@
/en-US/docs/Web/API/Web_Audio_API/Migrating_from_webkitAudioContext /en-US/docs/Web/API/Web_Audio_API
/en-US/docs/Web/API/Web_Audio_API/Porting_webkitAudioContext_code_to_standards_based_AudioContext /en-US/docs/Web/API/Web_Audio_API
/en-US/docs/Web/API/Web_Audio_API/Targeting /en-US/docs/Web/API/WebXR_Device_API/Targeting
/en-US/docs/Web/API/Web_Audio_API/Tools /en-US/docs/Web/API/Web_Audio_API
/en-US/docs/Web/API/Web_Audio_API/Web_audio_spatialisation_basics /en-US/docs/Web/API/Web_Audio_API/Web_audio_spatialization_basics
/en-US/docs/Web/API/Web_Audio_API/ended_event /en-US/docs/Web/API/AudioScheduledSourceNode/ended_event
/en-US/docs/Web/API/Web_Crypto_API/Supported_algorithms /en-US/docs/Web/API/SubtleCrypto
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 @@ -65415,10 +65415,6 @@
"modified": "2020-06-16T14:49:12.422Z",
"contributors": ["jmcantrell", "DianeLooney", "Sheppy"]
},
"Web/API/Web_Audio_API/Tools": {
"modified": "2019-03-18T21:37:44.787Z",
"contributors": ["chrisdavidmills", "alien35", "Sheppy"]
},
"Web/API/Web_Audio_API/Using_AudioWorklet": {
"modified": "2020-10-11T19:28:05.402Z",
"contributors": ["hamishwillee", "tcveatch", "Sheppy"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Now click on the play arrow in the top right corner of the scene to launch and r

This looks great! Let's add more shapes to the scene to make it look more interesting.

![PlayCanvas Editor - Boxrender](playcanvas-editor-boxrender.png)
![PlayCanvas Editor - Box render](playcanvas-editor-boxrender.png)

## Adding more shapes

Expand All @@ -97,7 +97,7 @@ Now follow the same steps as we did before when coloring the cube:

![PlayCanvas Editor - Cylinder material](playcanvas-editor-cylindermaterial.png)

Follow the same approach again to add a cone to the scene, giving it a grayish color (we used EAEFF2.) You should now have three shapes on your scene, something like the below screenshot.
Follow the same approach again to add a cone to the scene, giving it a grayish color (we used `#EAEFF2`.) You should now have three shapes on your scene, something like the below screenshot.

![PlayCanvas Editor - Cone](playcanvas-editor-cone.png)

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/games/techniques/audio_for_web_games/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ The advantage is that we can prime one piece of audio and have our sprites ready

```js
const myAudio = document.createElement("audio");
myAudio.src = "mysprite.mp3";
myAudio.src = "my-sprite.mp3";
myAudio.play();
myAudio.pause();
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,9 @@ if (gamepadAPI.buttonPressed("B")) {
}
```

## The paused and gameover states
## The paused and game-over states

We already learned how to control the whole lifecycle of the game: pausing the gameplay, restarting it, or getting back to the main menu. It works smooth on mobile and desktop, and adding gamepad controls is just as straightforward — in the `update()` function, we check to see if the current state status is `paused` — if so, the relevant actions are enabled:
We already learned how to control the whole lifecycle of the game: pausing the gameplay, restarting it, or getting back to the main menu. It works smooth on mobile and desktop, and adding gamepad controls is just as straightforward — in the `update()` function, we check to see if the current state status is "paused" — if so, the relevant actions are enabled:

```js
if (GamepadAPI.buttons.pressed("Start")) {
Expand All @@ -360,7 +360,7 @@ if (GamepadAPI.buttons.pressed("Back")) {
}
```

Similarly, when the `gameover` state status is active, then we can allow the user to restart the game instead of continuing it:
Similarly, when the "game-over" state status is active, then we can allow the user to restart the game instead of continuing it:

```js
if (GamepadAPI.buttons.pressed("Start")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ You can see it in action by watching [this video](https://www.youtube.com/watch?

Have you ever thought about controlling a game only with your hands? It's possible with [Leap Motion](https://www.ultraleap.com/), an immersive controller for games and apps.

Leapmotion is becoming more and more popular due to very good integration with VR headsets — demoing [Rainbow Membrane](https://mozilla.github.io/rainbow/) on an Oculus Rift with Leap Motion attached to it was voted one of the best WebVR experiences by JavaScript developers visiting demo booths at conferences around the world.
Leap Motion is becoming more and more popular due to very good integration with VR headsets — demoing [Rainbow Membrane](https://mozilla.github.io/rainbow/) on an Oculus Rift with Leap Motion attached to it was voted one of the best WebVR experiences by JavaScript developers visiting demo booths at conferences around the world.

As well as being great for virtual interfaces, it can also be used for a casual 2D gaming experiences. It would be very difficult to do everything with only your hands, but it's totally doable for the simple Captain Roger's gameplay — steering the ship and shooting the bullets.

Expand Down Expand Up @@ -158,15 +158,15 @@ The `diff` would be the difference between the initial position of the hand and

This approach won't give us the full flexibility of using a Gamepad, or even Leap Motion, but it's definitely an interesting, unconventional alternative. You can use it to scroll a page hands-free, or play theremin, but it should also be enough to move the ship up and down the screen if implemented correctly.

## MaKey MaKey
## Makey Makey

If you want to go completely bananas you can use [MaKey MaKey](https://makeymakey.com/), a board that can turn anything into a controller — it's all about connecting real-world, conductive objects to a computer and using them as touch interfaces.
If you want to go completely bananas you can use [Makey Makey](https://makeymakey.com/), a board that can turn anything into a controller — it's all about connecting real-world, conductive objects to a computer and using them as touch interfaces.

![Controlling a banana piano using Makey Makey.](controls-banana.png)

Check out the [banana piano video](https://www.youtube.com/watch?v=_DWQ6ce2Ags), and be sure to visit the [quick start guide](https://learn.sparkfun.com/tutorials/makey-makey-quickstart-guide) for all the needed info.

There's even a [Cylon.js-supported Makey Button functionality](https://cylonjs.com/documentation/drivers/makey-button/) inspired by the MaKey MaKey board, so you can use the popular Cylon robotics framework for your experiments with Arduino or Raspberry Pi. Connecting the boards and using them may look like this:
There's even a [Cylon.js-supported Makey Button functionality](https://cylonjs.com/documentation/drivers/makey-button/) inspired by the Makey Makey board, so you can use the popular Cylon robotics framework for your experiments with Arduino or Raspberry Pi. Connecting the boards and using them may look like this:

```js
const Cylon = require("cylon");
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/games/techniques/tilemaps/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,4 @@ In fast games that might still not be enough. An alternative method would be to

- [Demos and source code](https://mozdevs.github.io/gamedev-js-tiles/)
- [Grid parts and relationships](https://www.redblobgames.com/grids/parts/) by Amit Patel (May 2021)
- [Isometric graphics in videogames](https://en.wikipedia.org/wiki/Isometric_graphics_in_video_games_and_pixel_art) (Wikipedia)
- [Isometric graphics in video games](https://en.wikipedia.org/wiki/Isometric_graphics_in_video_games_and_pixel_art) (Wikipedia)
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ All the lessons — and the different versions of the [MDN Breakout game](https:
6. [Bounce off the walls](/en-US/docs/Games/Tutorials/2D_breakout_game_Phaser/Bounce_off_the_walls)
7. [Player paddle and controls](/en-US/docs/Games/Tutorials/2D_breakout_game_Phaser/Player_paddle_and_controls)
8. [Game over](/en-US/docs/Games/Tutorials/2D_breakout_game_Phaser/Game_over)
9. [Build the brickfield](/en-US/docs/Games/Tutorials/2D_breakout_game_Phaser/Build_the_brick_field)
9. [Build the brick field](/en-US/docs/Games/Tutorials/2D_breakout_game_Phaser/Build_the_brick_field)
10. [Collision detection](/en-US/docs/Games/Tutorials/2D_breakout_game_Phaser/Collision_detection)
11. [The score](/en-US/docs/Games/Tutorials/2D_breakout_game_Phaser/The_score)
12. [Win the game](/en-US/docs/Games/Tutorials/2D_breakout_game_Phaser/Win_the_game)
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/glossary/accessible_name/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Other elements get their accessible name from the content of associated elements

For some elements, the accessible name comes from the element's attributes; for example, the `alt` attribute in the case of {{HTMLElement("img")}}. Given `<img src="grape.jpg" alt="banana"/>`, the image's accessible name is "banana."

To create an association between visible content and an element or multiple text nodes and an element, the [`aria-labeledby`](/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby) attribute can be used. If there is no visible text to associate with a UI element needing an accessible name, the [`aria-label`](/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label) attribute can be used. Names should not be added to elements marking up inline text, like {{HTMLElement("code")}}, {{HTMLElement("del")}}, and {{HTMLElement("mark")}}.
To create an association between visible content and an element or multiple text nodes and an element, the [`aria-labelledby`](/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby) attribute can be used. If there is no visible text to associate with a UI element needing an accessible name, the [`aria-label`](/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label) attribute can be used. Names should not be added to elements marking up inline text, like {{HTMLElement("code")}}, {{HTMLElement("del")}}, and {{HTMLElement("mark")}}.

Many elements, such as sections of textual content, don't need an accessible name. All controls should have an accessible name. All images that convey information and aren't purely presentational do too.

Expand Down
22 changes: 17 additions & 5 deletions files/en-us/glossary/application_context/index.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
---
title: Application Context
title: Application context
slug: Glossary/Application_context
page-type: glossary-definition
---

{{GlossarySidebar}}

An **application context** is a top-level {{glossary("browsing context")}} that has a [manifest](/en-US/docs/Web/Manifest) applied to it.
**Application context** refers to the top-level {{glossary("browsing context")}} of a [web application](/en-US/docs/Web/Progressive_web_apps).
It determines how an app's browsing context, such as a tab or a window, is presented and behaves.

If an application context is created as a result of the user agent being asked to navigate to a deep link, the user agent must immediately navigate to the deep link with replacement enabled. Otherwise, when the application context is created, the user agent must immediately navigate to the start URL with replacement enabled.
Web developers define the application context in the [web app's manifest file](/en-US/docs/Web/Manifest).
They use the [`scope`](/en-US/docs/Web/Manifest/scope) member in the manifest to specify the set of URLs that are considered part of the application context and to which the manifest applies.

Please note that the start URL is not necessarily the value of the start_url member: the user or user agent could have changed it when the application was added to home-screen or otherwise bookmarked.
The manifest is applied after the application context is created but before navigation begins to either a start URL or a deep link.
A **start URL** is the initial page of the web app.
A **deep link** is a URL that directs users to a specific page within the web app, bypassing the home page.
The application context ensures that the app's defined behavior and presentation are maintained within its scope.

When an application context is created, browsers must immediately navigate to a start URL or a deep link.
This navigation replaces the current entry in the browsing history.
If the application context is created to navigate to a deep link, the browser navigates directly to that deep link; otherwise, it navigates to the start URL.

Note that the start URL is not necessarily the value of the [`start_url`](/en-US/docs/Web/Manifest/start_url) member in the manifest. Browsers may ignore the specified `start_url` or may allow users to change its value when adding the web app to their device's home screen or bookmarking it.

## See also

- [Progressive web apps (PWA)](/en-US/docs/Web/Progressive_web_apps)
- [`scope`](/en-US/docs/Web/Manifest/scope)
- [Web app manifests](/en-US/docs/Web/Manifest)
- [Progressive web apps (PWA)](/en-US/docs/Web/Progressive_web_apps)
2 changes: 1 addition & 1 deletion files/en-us/glossary/baseline/compatibility/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Baseline considers support in the following browsers:
- Mozilla Firefox (Android)
- Mozilla Firefox (desktop)

Baseline is a summary of browser support. It is not a substitute for accessibility, usability, performance, security, or other testing. Baseline may not tell if you if a feature works with:
Baseline is a summary of browser support. It is not a substitute for accessibility, usability, performance, security, or other testing. Baseline may not tell you if a feature works with:

- Older devices and browser releases
- Browsers not covered by the Baseline definition, such as operating system web views
Expand Down
11 changes: 6 additions & 5 deletions files/en-us/glossary/boolean/html/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ page-type: glossary-definition

{{GlossarySidebar}}

A **boolean attribute** in {{Glossary("HTML")}} is an {{glossary("attribute")}} that represents `true` or `false` values. If an HTML tag contains a boolean attribute - no matter the value of that attribute - the attribute is set to `true` on that element. If an HTML tag does not contain the attribute, the attribute is set to `false`.
A **boolean attribute** in {{Glossary("HTML")}} is an {{glossary("attribute")}} that represents `true` or `false` values. If an HTML tag contains a boolean attribute no matter the value of that attribute the attribute is set to `true` on that element. If an HTML tag does not contain the attribute, the attribute is set to `false`.

If the attribute is present, it can have one of the following values:
If the attribute is present, it can have one of the following forms:

- no value at all, e.g. `attribute`
- the empty string, e.g. `attribute=""`
- attribute's name itself, with no leading or trailing whitespace, e.g. `attribute="attribute"`
- the attribute name alone; e.g., `attribute`, meaning its implicit value is the empty string
- the attribute with a value of the empty string; e.g., `attribute=""`
- the attribute with a value of the attribute's name itself, with no leading or trailing whitespace and case ignored; e.g., `attribute="attribute"`, `attribute="ATTRIBUTE"`

> [!NOTE]
> The strings "true" and "false" are invalid values. To set the attribute to `false`, the attribute should be omitted altogether. Though modern browsers treat _any_ string value as `true`, you should not rely on that behavior.
Expand All @@ -24,6 +24,7 @@ Here's an example of a HTML boolean attribute `checked`:
<input type="checkbox" checked />
<input type="checkbox" checked="" />
<input type="checkbox" checked="checked" />
<input type="checkbox" checked="Checked" />

<!-- The following checkbox will not be checked on initial rendering -->
<input type="checkbox" />
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/glossary/entity_header/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ An entity header is an {{glossary("HTTP_header", "HTTP header")}} that describes
In the following example, {{HTTPHeader("Content-Length")}} is an entity header, while {{HTTPHeader("Host")}} and {{HTTPHeader("User-Agent")}} are requests headers:

```http
POST /myform.html HTTP/1.1
POST /my-form.html HTTP/1.1
Host: developer.mozilla.org
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:50.0) Gecko/20100101 Firefox/50.0
Content-Length: 128
Expand Down
2 changes: 2 additions & 0 deletions files/en-us/glossary/falsy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ page-type: glossary-definition

{{GlossarySidebar}}

<!-- cSpell:ignore falsey -->

A **falsy** (sometimes written **falsey**) value is a value that is considered false when encountered in a {{Glossary("Boolean")}} context.

{{Glossary("JavaScript")}} uses {{Glossary("Type_Conversion", "type conversion")}} to coerce any value to a Boolean in contexts that require it, such as {{Glossary("Conditional", "conditionals")}} and {{Glossary("Loop", "loops")}}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ page-type: glossary-definition

A **fetch metadata request header** is an {{Glossary("Request header", "HTTP request header")}} that provides additional information about the context from which the request originated. This allows the server to make decisions about whether a request should be allowed based on where the request came from and how the resource will be used.

With this information a server can implement a resource isolation policy, allowing external sites to request only those resources that are intended for sharing, and that are used appropriately. This approach can help mitigate common cross-site web vulnerabilities such as {{Glossary("CSRF")}}, Cross-site Script Inclusion('XSSI'), timing attacks, and cross-origin information leaks.
With this information a server can implement a resource isolation policy, allowing external sites to request only those resources that are intended for sharing, and that are used appropriately. This approach can help mitigate common cross-site web vulnerabilities such as {{Glossary("CSRF")}}, Cross-site Script Inclusion (XSSI), timing attacks, and cross-origin information leaks.

These headers are prefixed with `Sec-`, and hence have {{Glossary("Forbidden header name", "forbidden header names")}}. As such, they cannot be modified from JavaScript.

Expand Down
4 changes: 3 additions & 1 deletion files/en-us/glossary/google_chrome/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ page-type: glossary-definition

{{GlossarySidebar}}

Google Chrome is a free Web {{glossary("browser")}} developed by Google. It's based on the [Chromium](https://www.chromium.org/) open source project. Some key differences are described on [BrowserStack](https://www.browserstack.com/guide/difference-between-chrome-and-chromium#toc5). Chrome supports its own layout called {{glossary("Blink")}}. Note that the iOS version of Chrome uses that platform's WebView, not Blink.
Google Chrome is a free Web {{glossary("browser")}} developed by Google, based on the [Chromium](https://www.chromium.org/) open source project. Some key differences are described in BrowserStack's [Chrome vs Chromium: Core Differences](https://www.browserstack.com/guide/difference-between-chrome-and-chromium) guide.

Chromium also has its own layout engine called {{glossary("Blink")}}; note however that the iOS version of Chrome uses that platform's WebView rather than Blink, due to platform restrictions.

## See also

Expand Down
Loading

0 comments on commit 72c1e6c

Please sign in to comment.