Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ page-type: learn-module-chapter
sidebar: learnsidebar
---

{{NextMenu("Learn_web_development/Core/Frameworks_libraries/Svelte_todo_list_beginning", "Learn_web_development/Core/Frameworks_libraries")}}
{{NextMenu("Learn_web_development/Core/Frameworks_libraries/Svelte_Todo_list_beginning", "Learn_web_development/Core/Frameworks_libraries")}}

In this article we'll provide a quick introduction to the [Svelte framework](https://svelte.dev/). We will see how Svelte works and what sets it apart from the rest of the frameworks and tools we've seen so far. Then we will learn how to set up our development environment, create a sample app, understand the structure of the project, and see how to run it locally and build it for production.

Expand Down Expand Up @@ -507,4 +507,4 @@ In Svelte:
- The top-level variables of a component constitute its state.
- Reactivity is fired just by assigning a new value to a top-level variable.

{{NextMenu("Learn_web_development/Core/Frameworks_libraries/Svelte_todo_list_beginning", "Learn_web_development/Core/Frameworks_libraries")}}
{{NextMenu("Learn_web_development/Core/Frameworks_libraries/Svelte_Todo_list_beginning", "Learn_web_development/Core/Frameworks_libraries")}}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ page-type: tutorial-chapter
sidebar: learnsidebar
---

{{NextMenu("Learn_web_development/Getting_started/Web_standards/The_Web_standards_model", "Learn_web_development/Getting_started/Web_standards")}}
{{NextMenu("Learn_web_development/Getting_started/Web_standards/The_web_standards_model", "Learn_web_development/Getting_started/Web_standards")}}

_How the web works_ provides a high-level description of what happens when you use a web browser to navigate to a web page, explaining the magic that goes on behind the scenes to deliver the relevant code to your computer for the browser to assemble into something you can look at.

Expand Down
5 changes: 4 additions & 1 deletion files/en-us/mozilla/firefox/releases/150/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ Firefox 150 is the current [Beta version of Firefox](https://www.firefox.com/en-

<!-- #### Removals -->

<!-- ### CSS -->
### CSS

- The [`light-dark()`](/en-US/docs/Web/CSS/Reference/Values/color_value/light-dark) CSS function now accepts [`<image>`](/en-US/docs/Web/CSS/Reference/Values/image) values. This allows using images, gradients, and so on for different color schemes.
([Firefox bug 2023569](https://bugzil.la/2023569)).

<!-- #### Removals -->

Expand Down
16 changes: 4 additions & 12 deletions files/en-us/web/api/webgl_lose_context/losecontext/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ browser-compat: api.WEBGL_lose_context.loseContext

{{APIRef("WebGL")}}

The **WEBGL_lose_context.loseContext()** method is part of the [WebGL API](/en-US/docs/Web/API/WebGL_API) and allows you to simulate losing
the context of a {{domxref("WebGLRenderingContext")}} context.
The **`loseContext()`** method of the `WEBGL_lose_context` extension is part of the [WebGL API](/en-US/docs/Web/API/WebGL_API) and allows you to simulate losing the context of a {{domxref("WebGLRenderingContext")}}.

It triggers the steps described in the WebGL specification for handling context lost.
The context will remain lost until {{domxref("WEBGL_lose_context.restoreContext()")}} is
called.
It triggers the [steps described in the WebGL specification](https://registry.khronos.org/webgl/specs/latest/1.0/#5.15.2) for handling context lost. The context will remain lost until {{domxref("WEBGL_lose_context.restoreContext()")}} is called. It also destroys the underlying graphics context and all graphics resources. This is the recommended mechanism for applications to programmatically halt their use of the WebGL API.

## Syntax

Expand All @@ -31,9 +28,7 @@ None ({{jsxref("undefined")}}).

## Examples

With this method, you can simulate the
[`webglcontextlost`](/en-US/docs/Web/API/HTMLCanvasElement/webglcontextlost_event)
event:
With this method, you can simulate the [`webglcontextlost`](/en-US/docs/Web/API/HTMLCanvasElement/webglcontextlost_event) event:

```js
const canvas = document.getElementById("canvas");
Expand All @@ -59,7 +54,4 @@ gl.getExtension("WEBGL_lose_context").loseContext();
## See also

- {{domxref("WebGLRenderingContext.isContextLost()")}}
- Events:
[`webglcontextlost`](/en-US/docs/Web/API/HTMLCanvasElement/webglcontextlost_event),
[`webglcontextrestored`](/en-US/docs/Web/API/HTMLCanvasElement/webglcontextrestored_event),
[`webglcontextcreationerror`](/en-US/docs/Web/API/HTMLCanvasElement/webglcontextcreationerror_event)
- Events: [`webglcontextlost`](/en-US/docs/Web/API/HTMLCanvasElement/webglcontextlost_event), [`webglcontextrestored`](/en-US/docs/Web/API/HTMLCanvasElement/webglcontextrestored_event), [`webglcontextcreationerror`](/en-US/docs/Web/API/HTMLCanvasElement/webglcontextcreationerror_event)
14 changes: 5 additions & 9 deletions files/en-us/web/api/webgl_lose_context/restorecontext/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ browser-compat: api.WEBGL_lose_context.restoreContext

{{APIRef("WebGL")}}

The **WEBGL_lose_context.restoreContext()** method is part of the [WebGL API](/en-US/docs/Web/API/WebGL_API) and allows you to simulate
restoring the context of a {{domxref("WebGLRenderingContext")}} object.
The **`restoreContext()`** method of the `WEBGL_lose_context` extension is part of the [WebGL API](/en-US/docs/Web/API/WebGL_API) and allows you to simulate restoring the context of a {{domxref("WebGLRenderingContext")}}.

It triggers the [steps described in the WebGL specification](https://registry.khronos.org/webgl/specs/latest/1.0/#5.15.3) for handling context restored. The context is not usable until the {{domxref("HTMLCanvasElement.webglcontextrestored_event", "webglcontextrestored")}} event is fired.

## Syntax

Expand All @@ -34,9 +35,7 @@ Browsers may not report WebGL errors by default. WebGL's error reporting works b

## Examples

With this method, you can simulate the
[`webglcontextrestored`](/en-US/docs/Web/API/HTMLCanvasElement/webglcontextrestored_event)
event:
With this method, you can simulate the [`webglcontextrestored`](/en-US/docs/Web/API/HTMLCanvasElement/webglcontextrestored_event) event:

```js
const canvas = document.getElementById("canvas");
Expand All @@ -60,7 +59,4 @@ gl.getExtension("WEBGL_lose_context").restoreContext();
## See also

- {{domxref("WebGLRenderingContext.isContextLost()")}}
- Events:
[`webglcontextlost`](/en-US/docs/Web/API/HTMLCanvasElement/webglcontextlost_event),
[`webglcontextrestored`](/en-US/docs/Web/API/HTMLCanvasElement/webglcontextrestored_event),
[`webglcontextcreationerror`](/en-US/docs/Web/API/HTMLCanvasElement/webglcontextcreationerror_event)
- Events: [`webglcontextlost`](/en-US/docs/Web/API/HTMLCanvasElement/webglcontextlost_event), [`webglcontextrestored`](/en-US/docs/Web/API/HTMLCanvasElement/webglcontextrestored_event), [`webglcontextcreationerror`](/en-US/docs/Web/API/HTMLCanvasElement/webglcontextcreationerror_event)
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ text-indent: unset;
- {{cssxref("&lt;length&gt;")}}
- : Indentation is specified as an absolute {{cssxref("&lt;length&gt;")}}. Negative values are allowed. See {{cssxref("&lt;length&gt;")}} values for possible units.
- {{cssxref("&lt;percentage&gt;")}}
- : Indentation is a {{cssxref("&lt;percentage&gt;")}}. The percentage is relative to the containing block's width.
- : Indentation is a {{cssxref("&lt;percentage&gt;")}}. The percentage is relative to the container's own inner inline size.
- `each-line`
- : Indentation affects the first line of the block container as well as each line after a _forced line break_, but does not affect lines after a _soft wrap break_.
- `hanging`
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
title: browser.close command
short-title: browser.close
slug: Web/WebDriver/Reference/BiDi/Modules/browser/close
page-type: webdriver-command
browser-compat: webdriver.bidi.browser.close
sidebar: webdriver
---

The `browser.close` [command](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules#commands) of the [`browser`](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser) module closes the browser and ends all active WebDriver sessions. Tabs are closed without running [`beforeunload`](/en-US/docs/Web/API/Window/beforeunload_event) event handler functions. The response is sent before the WebSocket connection is closed.

## Syntax

```json-nolint
{
"method": "browser.close",
"params": {}
}
```

### Parameters

None. However, you must include the `params` field and set it to an empty object (`{}`).

### Return value

The `result` field in the response is an empty object (`{}`).

### Errors

- `unable to close browser`
- : There are other active WebDriver sessions open at the time the command is sent.
Browsers may return this error before continuing to close.

## Examples

### Closing the browser

With a [WebDriver BiDi connection](/en-US/docs/Web/WebDriver/How_to/Create_BiDi_connection) and an [active session](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/session/new), send the following message to close the browser:

```json
{
"id": 1,
"method": "browser.close",
"params": {}
}
```

Before closing, the browser responds successfully as shown here:

```json
{
"id": 1,
"type": "success",
"result": {}
}
```

After the response, the WebSocket connection closes as the browser shuts down.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- [`session.new`](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/session/new) command
- [`session.end`](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/session/end) command
- [`browser.createUserContext`](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser/createUserContext) command
- [`browser.getUserContexts`](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser/getUserContexts) command
- [`browser.removeUserContext`](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser/removeUserContext) command
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
---
title: browser.createUserContext command
short-title: browser.createUserContext
slug: Web/WebDriver/Reference/BiDi/Modules/browser/createUserContext
page-type: webdriver-command
browser-compat: webdriver.bidi.browser.createUserContext
sidebar: webdriver
---

The `browser.createUserContext` [command](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules#commands) of the [`browser`](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser) module creates a new [user context](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser#user_contexts) in the browser.

## Syntax

```json-nolint
{
"method": "browser.createUserContext",
"params": {}
}
```

### Parameters

Set `params` to an empty object (`{}`) or include any of the following optional fields:

- [`acceptInsecureCerts`](/en-US/docs/Web/WebDriver/Reference/Capabilities/acceptInsecureCerts) {{optional_inline}}
- : A boolean that controls whether untrusted TLS certificates (for example, self-signed or expired) are accepted within this user context. When set, it overrides the [session-level](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/session/new#acceptinsecurecerts) `acceptInsecureCerts` setting for this user context.
- `proxy` {{optional_inline}}
- : An object that specifies the proxy configuration the browser should use for network requests within this user context. When set, it overrides the [session-level](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/session/new#proxy) `proxy` setting for this user context.
- `unhandledPromptBehavior` {{optional_inline}}
- : An object that specifies the default behavior when a user prompt (such as an `alert`, `confirm`, or `prompt` dialog) is encountered within this user context. When set, it overrides the [session-level](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/session/new#unhandledpromptbehavior) `unhandledPromptBehavior` setting for this user context.

> [!NOTE]
> When a parameter is set, it applies to all existing and future tabs within this user context.

### Return value

The following field in the `result` object of the response describes the created user context:

- `userContext`
- : A string that uniquely identifies the created user context.

### Errors

- `unsupported operation`
- : `acceptInsecureCerts` is `true` but the browser does not support accepting insecure TLS connections, or `proxy` is specified but the browser cannot configure proxy settings for this user context or cannot apply the given proxy configuration.

## Examples

### Creating a user context with default settings

With a [WebDriver BiDi connection](/en-US/docs/Web/WebDriver/How_to/Create_BiDi_connection) and an [active session](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/session/new), send the following message to create a user context:

```json
{
"id": 1,
"method": "browser.createUserContext",
"params": {}
}
```

The browser responds with a successful user context creation as follows:

```json
{
"id": 1,
"type": "success",
"result": {
"userContext": "4e4b1f6d-3f1a-4b2e-9f8c-1a2b3c4d5e6f"
}
}
```

### Creating a user context with a proxy

Send the following message to create a user context that routes network requests through a proxy:

```json
{
"id": 2,
"method": "browser.createUserContext",
"params": {
"proxy": {
"proxyType": "manual",
"httpProxy": "127.0.0.1:80"
}
}
}
```

The browser responds with a successful user context creation as follows:

```json
{
"id": 2,
"type": "success",
"result": {
"userContext": "7d9e2a1b-5c3f-4e6d-8a7b-2c1d0e9f8a7b"
}
}
```

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- [`session.new`](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/session/new) command
- [`browser.getUserContexts`](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser/getUserContexts) command
- [`browser.removeUserContext`](/en-US/docs/Web/WebDriver/Reference/BiDi/Modules/browser/removeUserContext) command
Loading
Loading