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
1 change: 1 addition & 0 deletions files/en-us/web/api/css_object_model/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Several other interfaces are also extended by the CSSOM-related specifications:

- {{DOMxRef("CSSImageValue")}}
- {{DOMxRef("CSSKeywordValue")}}
- {{DOMxRef("CSSMathClamp")}}
- {{DOMxRef("CSSMathInvert")}}
- {{DOMxRef("CSSMathMax")}}
- {{DOMxRef("CSSMathMin")}}
Expand Down
1 change: 1 addition & 0 deletions files/en-us/web/api/css_typed_om_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ The {{domxref('CSSKeywordValue')}} interface of the CSS Typed Object Model API c
- : A tree of subclasses representing numeric values that are more complicated than a single value and unit, including:
- {{domxref('CSSMathMax')}} - represents the CSS {{cssxref("max","max()")}} function.
- {{domxref('CSSMathMin')}} - represents the CSS {{cssxref("min","min()")}} function.
- {{domxref('CSSMathClamp')}} - represents the CSS {{cssxref("clamp","clamp()")}} function.
- {{domxref('CSSMathNegate')}} - negates the value passed into it.
- {{domxref('CSSMathInvert')}} - represents a CSS {{cssxref("calc","calc()")}} value used as `calc(1 / <value>)`. This type is used internally by {{domxref('CSSNumericValue.div','div()')}}, to create an appropriate {{domxref('CSSMathProduct')}}.
- {{domxref('CSSMathProduct')}} - represents the result obtained by calling {{domxref('CSSNumericValue.mul','mul()')}} or {{domxref('CSSNumericValue.div','div()')}} on {{domxref('CSSNumericValue')}}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const rules = document.getElementById("css-output").sheet.cssRules;
const layerStatementRule = rules[0]; // A CSSLayerStatementRule
const layerBlockRule = rules[1]; // A CSSLayerBlockRule; no nameList property.

item.textContent = `@layer declares the following layers: ${layer.nameList.join(
item.textContent = `@layer declares the following layers: ${layerStatementRule.nameList.join(
", ",
)}.`;
```
Expand Down
46 changes: 46 additions & 0 deletions files/en-us/web/api/cssmathclamp/cssmathclamp/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: "CSSMathClamp: CSSMathClamp() constructor"
short-title: CSSMathClamp()
slug: Web/API/CSSMathClamp/CSSMathClamp
page-type: web-api-constructor
status:
- experimental
browser-compat: api.CSSMathClamp.CSSMathClamp
---

{{SeeCompatTable}}{{APIRef("CSS Typed Object Model API")}}

The **`CSSMathClamp()`** constructor creates a
new {{domxref("CSSMathClamp")}} object representing a CSS {{CSSXref("clamp", "clamp()")}} function.

## Syntax

```js-nolint
new CSSMathClamp(lower, value, upper)
```

### Parameters

- `lower`
- : A {{domxref("CSSNumericValue")}} object – either a number or {{domxref("CSSUnitValue")}} – representing the minimum value.
- `value`
- : A {{domxref("CSSNumericValue")}} object – either a number or {{domxref("CSSUnitValue")}} – representing the preferred value.
- `upper`
- : A {{domxref("CSSNumericValue")}} object – either a number or {{domxref("CSSUnitValue")}} – representing the maximum value.

### Exceptions

- [`TypeError`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError)
- : Thrown if there is a _failure_ when adding the three arguments.

## Examples

To do

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
51 changes: 51 additions & 0 deletions files/en-us/web/api/cssmathclamp/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: CSSMathClamp
slug: Web/API/CSSMathClamp
page-type: web-api-interface
browser-compat: api.CSSMathClamp
---

{{APIRef("CSS Typed Object Model API")}}

The **`CSSMathClamp`** interface of the [CSS Typed Object Model API](/en-US/docs/Web/API/CSS_Object_Model) represents the CSS {{CSSXref("clamp","clamp()")}} function. It inherits properties and methods from its parent {{domxref("CSSNumericValue")}}.

{{InheritanceDiagram}}

## Constructor

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

## Instance properties

- {{domxref("CSSMathClamp.lower")}}
- : Returns a {{domxref("CSSNumericValue")}} object containing the minimum value.
- {{domxref("CSSMathClamp.value")}}
- : Returns a {{domxref("CSSNumericValue")}} object containing the preferred value.
- {{domxref("CSSMathClamp.upper")}}
- : Returns a {{domxref("CSSNumericValue")}} object containing the upper value.

## Static methods

_The interface also inherits methods from its parent interface, {{domxref("CSSMathValue")}}._

## Instance methods

_The interface also inherits methods from its parent interface, {{domxref("CSSMathValue")}}._

## Examples

To do

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("CSSMathMax")}}
- {{domxref("CSSMathMin")}}
33 changes: 33 additions & 0 deletions files/en-us/web/api/cssmathclamp/lower/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: "CSSMathClamp: lower property"
short-title: lower
slug: Web/API/CSSMathClamp/lower
page-type: web-api-instance-property
browser-compat: api.CSSMathClamp.lower
---

{{APIRef("CSS Typed Object Model API")}}

The **`lower`** read-only property of the
{{domxref("CSSMathClamp")}} interface returns a {{domxref("CSSNumericValue")}} object containing the minimum value of a {{domxref("CSSMathClamp")}} object.

## Value

A {{domxref("CSSNumericValue")}}.

## Examples

To do

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("CSSMathClamp.value")}}
- {{domxref("CSSMathClamp.upper")}}
33 changes: 33 additions & 0 deletions files/en-us/web/api/cssmathclamp/upper/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: "CSSMathClamp: upper property"
short-title: upper
slug: Web/API/CSSMathClamp/upper
page-type: web-api-instance-property
browser-compat: api.CSSMathClamp.upper
---

{{APIRef("CSS Typed Object Model API")}}

The **`upper`** read-only property of the
{{domxref("CSSMathClamp")}} interface returns a {{domxref("CSSNumericValue")}} object containing the maximum value of a {{domxref("CSSMathClamp")}} object.

## Value

A {{domxref("CSSNumericValue")}}.

## Examples

To do

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("CSSMathClamp.lower")}}
- {{domxref("CSSMathClamp.value")}}
34 changes: 34 additions & 0 deletions files/en-us/web/api/cssmathclamp/value/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: "CSSMathClamp: value property"
short-title: value
slug: Web/API/CSSMathClamp/value
page-type: web-api-instance-property
browser-compat: api.CSSMathClamp.value
---

{{APIRef("CSS Typed Object Model API")}}

The **`value`** read-only property of the
{{domxref("CSSMathClamp")}} interface returns a {{domxref("CSSNumericValue")}} object containing the preferred value of a {{domxref("CSSMathClamp")}} object.

## Value

A {{domxref("CSSNumericValue")}}.

## Examples

To do

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("CSSMathClamp.lower")}}
- {{domxref("CSSMathClamp.value")}}
- {{domxref("CSSMathClamp.upper")}}
1 change: 1 addition & 0 deletions files/en-us/web/api/cssmathvalue/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The **`CSSMathValue`** interface of the [CSS Typed Object Model API](/en-US/docs

Below is a list of interfaces based on the CSSMathValue interface.

- {{DOMxRef('CSSMathClamp')}}
- {{domxref('CSSMathInvert')}}
- {{domxref('CSSMathMax')}}
- {{domxref('CSSMathMin')}}
Expand Down
13 changes: 10 additions & 3 deletions files/en-us/web/api/cssunitvalue/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ browser-compat: api.CSSUnitValue

{{APIRef("CSS Typed Object Model API")}}

The **`CSSUnitValue`** interface of the [CSS Typed Object Model API](/en-US/docs/Web/API/CSS_Object_Model#css_typed_object_model) represents values that contain a single unit type. For example, "42px" would be represented by a `CSSNumericValue`.
The **`CSSUnitValue`** interface of the [CSS Typed Object Model API](/en-US/docs/Web/API/CSS_Object_Model#css_typed_object_model) represents values that contain a single [unit type](/en-US/docs/Web/CSS/Guides/Values_and_units#units).

For example, the value `42px` (a {{cssxref("&lt;dimension&gt;")}}) would be represented by a `CSSNumericValue`.

{{InheritanceDiagram}}

Expand All @@ -19,9 +21,9 @@ The **`CSSUnitValue`** interface of the [CSS Typed Object Model API](/en-US/docs
## Instance properties

- {{domxref('CSSUnitValue.value')}}
- : Returns a double indicating the number of units.
- : Returns a double indicating the number of units. For a `CSSNumericValue` representing `42px`, this would be `42`.
- {{domxref('CSSUnitValue.unit')}}
- : Returns a string indicating the type of unit.
- : Returns a string indicating the type of unit. For a `CSSNumericValue` representing `42px`, this would be `"px"`.

## Static methods

Expand Down Expand Up @@ -49,3 +51,8 @@ let pos = new CSSPositionValue(
## Browser compatibility

{{Compat}}

## See also

- [CSS numeric data types](/en-US/docs/Web/CSS/Guides/Values_and_units/Numeric_data_types)
- [CSS values and units](/en-US/docs/Web/CSS/Guides/Values_and_units), a listing of all possible units and data types
7 changes: 4 additions & 3 deletions files/en-us/web/api/cssunitvalue/unit/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ browser-compat: api.CSSUnitValue.unit

The **`CSSUnitValue.unit`** read-only property
of the {{domxref("CSSUnitValue")}} interface returns a string
indicating the type of unit.
indicating the [unit type](/en-US/docs/Web/CSS/Guides/Values_and_units#units).

## Value

A string.
A string indicating the unit type, such as `"em"`, `"px"`, `"%"`, etc.

## Examples

Expand Down Expand Up @@ -43,6 +43,7 @@ console.log(pos.y.unit); // "em"
## See also

- {{domxref('CSSUnitValue.value')}}
- [Dimensions in CSS values and units](/en-US/docs/Web/CSS/Guides/Values_and_units/Numeric_data_types#dimensions)
- [CSS numeric data types](/en-US/docs/Web/CSS/Guides/Values_and_units/Numeric_data_types)
- [CSS values and units](/en-US/docs/Web/CSS/Guides/Values_and_units), a listing of all possible unit types
- [Using the CSS Typed OM](/en-US/docs/Web/API/CSS_Typed_OM_API/Guide)
- [CSS Typed Object Model API](/en-US/docs/Web/API/CSS_Typed_OM_API)
2 changes: 1 addition & 1 deletion files/en-us/web/api/htmltablecellelement/valign/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ browser-compat: api.HTMLTableCellElement.vAlign
The **`vAlign`** property of the {{domxref("HTMLTableCellElement")}} interface is a string indicating how to vertically align text in a {{htmlelement("th")}} or {{htmlelement("td")}} table cell.

> [!NOTE]
> This property is deprecated. Use the CSS {{cssxref("vertical-align")}} property to horizontally align text in a cell instead.
> This property is deprecated. Use the CSS {{cssxref("vertical-align")}} property to vertically align text in a cell instead.
## Value

Expand Down
11 changes: 3 additions & 8 deletions files/en-us/web/api/navigator/sendbeacon/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,11 @@ sendBeacon(url, data)
- `url`
- : The URL that will receive the _data_. Can be relative or absolute.
- `data` {{Optional_inline}}
- : An {{jsxref("ArrayBuffer")}}, a {{jsxref("TypedArray")}}, a {{jsxref("DataView")}}, a {{domxref("Blob")}},
a string literal or object, a {{domxref("FormData")}} or a {{domxref("URLSearchParams")}}
object containing the data to send.
- : An {{jsxref("ArrayBuffer")}}, a {{jsxref("TypedArray")}}, a {{jsxref("DataView")}}, a {{domxref("Blob")}}, a string literal or object, a {{domxref("FormData")}} or a {{domxref("URLSearchParams")}} object containing the data to send. The total size of queued data is limited to 64 KiB (65,536 bytes).

### Return value

Returns `true` if the
{{glossary("user agent")}} successfully queued the `data` for transfer.
Otherwise, it returns `false`.
Returns `true` if the {{glossary("user agent")}} successfully queued the `data` for transfer. Otherwise, it returns `false`.

## Description

Expand Down Expand Up @@ -72,8 +68,7 @@ This means:

The data is sent as an [HTTP POST](/en-US/docs/Web/HTTP/Reference/Methods/POST) request.

> [!NOTE]
> The `navigator.sendBeacon()` method has a [spec-defined](https://fetch.spec.whatwg.org/#:~:text=length.-,If%20the%20sum%20of%20contentLength%20and%20inflightKeepaliveBytes%20is%20greater%20than%2064%20kibibytes%2C%20then%20return%20a%20network%20error.,-The) payload size limit of about 64 KiB. If this limit is exceeded, the request will fail. For larger data transfers, consider using `fetch()` instead.
The limitation, however, is that the payload size is limited to about 64 KiB. For larger data transfers, consider using `fetch()` instead.

### Sending analytics at the end of a session

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/rtcencodedvideoframe/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The **`RTCEncodedVideoFrame`** of the [WebRTC API](/en-US/docs/Web/API/WebRTC_AP
## Instance properties

- {{domxref("RTCEncodedVideoFrame.type")}} {{ReadOnlyInline}}
- : Returns whether the current frame is a key frame, delta frame, or empty frame.
- : Returns whether the current frame is a key frame or a delta frame.
- {{domxref("RTCEncodedVideoFrame.timestamp")}} {{ReadOnlyInline}} {{deprecated_inline}} {{non-standard_inline}}
- : Returns the timestamp at which sampling of the frame started.
- {{domxref("RTCEncodedVideoFrame.data")}}
Expand Down
10 changes: 2 additions & 8 deletions files/en-us/web/api/rtcencodedvideoframe/type/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ browser-compat: api.RTCEncodedVideoFrame.type

{{APIRef("WebRTC")}}{{AvailableInWorkers("window_and_dedicated")}}

The **`type`** read-only property of the {{domxref("RTCEncodedVideoFrame")}} interface indicates whether this frame is a key frame, delta frame, or empty frame.
The **`type`** read-only property of the {{domxref("RTCEncodedVideoFrame")}} interface indicates whether this frame is a key frame or a delta frame.

## Value

Expand All @@ -20,9 +20,6 @@ The type can have one of the following values:
- `delta`
- : This is a "delta frame", which contains changes to an image relative to some previous frame.
The frame cannot be decoded without access to the frame(s) that it references.
- `empty`
- : This frame contains no data.
This value is unexpected, and may indicate that the transform is holding a reference to frames after they have been transformed and piped to {{domxref("RTCRtpScriptTransformer.writable")}} (after transferring back to the main-thread WebRTC pipeline the worker side frame object will have no data).

## Examples

Expand All @@ -33,11 +30,8 @@ const transformer = new TransformStream({
async transform(encodedFrame, controller) {
if (encodedFrame.type === "key") {
// Apply key frame transformation
} else if (encodedFrame.type === "delta") {
// Apply delta frame transformation
} else {
// Empty
// Check transform is not holding reference to frames after processing!
// Apply delta frame transformation
}
controller.enqueue(encodedFrame);
},
Expand Down
Loading