Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
* Added `CommandEvent` and `CommandEventInit` from the Invoker Commands API.
[#4552](https://github.com/wasm-bindgen/wasm-bindgen/pull/4552)

* Added `AbstractRange`, `StaticRange`, and `StaticRangeInit` interfaces.
[#4221](https://github.com/wasm-bindgen/wasm-bindgen/pull/4221)

* Updated WebCodecs API to Working Draft 2026-01-29 and MediaRecorder API to 2025-04-17.
Added `rotation` and `flip` to `VideoDecoderConfig`.
[#4411](https://github.com/wasm-bindgen/wasm-bindgen/pull/4411)
Expand Down
5 changes: 4 additions & 1 deletion crates/web-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ default = ["std"]
std = ["wasm-bindgen/std", "js-sys/std"]
AbortController = []
AbortSignal = ["EventTarget"]
AbstractRange = []
AddEventListenerOptions = []
AesCbcParams = []
AesCtrParams = []
Expand Down Expand Up @@ -1091,7 +1092,7 @@ QueryOptions = []
QueuingStrategy = []
QueuingStrategyInit = []
RadioNodeList = ["NodeList"]
Range = []
Range = ["AbstractRange"]
RcwnPerfStats = []
RcwnStatus = []
ReadableByteStreamController = []
Expand Down Expand Up @@ -1307,6 +1308,8 @@ SpeechSynthesisEvent = ["Event"]
SpeechSynthesisEventInit = []
SpeechSynthesisUtterance = ["EventTarget"]
SpeechSynthesisVoice = []
StaticRange = ["AbstractRange"]
StaticRangeInit = []
StereoPannerNode = ["AudioNode", "EventTarget"]
StereoPannerOptions = []
Storage = []
Expand Down
52 changes: 52 additions & 0 deletions crates/web-sys/src/features/gen_AbstractRange.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = AbstractRange , typescript_type = "AbstractRange")]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AbstractRange` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbstractRange)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbstractRange`*"]
pub type AbstractRange;
#[cfg(feature = "Node")]
# [wasm_bindgen (structural , method , getter , js_class = "AbstractRange" , js_name = startContainer)]
#[doc = "Getter for the `startContainer` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbstractRange/startContainer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbstractRange`, `Node`*"]
pub fn start_container(this: &AbstractRange) -> Node;
# [wasm_bindgen (structural , method , getter , js_class = "AbstractRange" , js_name = startOffset)]
#[doc = "Getter for the `startOffset` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbstractRange/startOffset)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbstractRange`*"]
pub fn start_offset(this: &AbstractRange) -> u32;
#[cfg(feature = "Node")]
# [wasm_bindgen (structural , method , getter , js_class = "AbstractRange" , js_name = endContainer)]
#[doc = "Getter for the `endContainer` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbstractRange/endContainer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbstractRange`, `Node`*"]
pub fn end_container(this: &AbstractRange) -> Node;
# [wasm_bindgen (structural , method , getter , js_class = "AbstractRange" , js_name = endOffset)]
#[doc = "Getter for the `endOffset` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbstractRange/endOffset)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbstractRange`*"]
pub fn end_offset(this: &AbstractRange) -> u32;
# [wasm_bindgen (structural , method , getter , js_class = "AbstractRange" , js_name = collapsed)]
#[doc = "Getter for the `collapsed` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbstractRange/collapsed)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbstractRange`*"]
pub fn collapsed(this: &AbstractRange) -> bool;
}
165 changes: 165 additions & 0 deletions crates/web-sys/src/features/gen_Highlight.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,18 @@ extern "C" {
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_type(this: &Highlight, value: HighlightType);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "AbstractRange")]
#[wasm_bindgen(catch, constructor, variadic, js_class = "Highlight")]
#[doc = "The `new Highlight(..)` constructor, creating a new instance of `Highlight`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/Highlight)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbstractRange`, `Highlight`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new(initial_ranges: &::js_sys::Array) -> Result<Highlight, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen(catch, constructor, js_class = "Highlight")]
#[doc = "The `new Highlight(..)` constructor, creating a new instance of `Highlight`."]
#[doc = ""]
Expand All @@ -98,6 +110,135 @@ extern "C" {
initial_ranges: &::wasm_bindgen::JsValue,
) -> Result<Highlight, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "AbstractRange")]
#[wasm_bindgen(catch, constructor, js_class = "Highlight")]
#[doc = "The `new Highlight(..)` constructor, creating a new instance of `Highlight`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/Highlight)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbstractRange`, `Highlight`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new_1(initial_ranges_1: &AbstractRange) -> Result<Highlight, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "AbstractRange")]
#[wasm_bindgen(catch, constructor, js_class = "Highlight")]
#[doc = "The `new Highlight(..)` constructor, creating a new instance of `Highlight`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/Highlight)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbstractRange`, `Highlight`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new_2(
initial_ranges_1: &AbstractRange,
initial_ranges_2: &AbstractRange,
) -> Result<Highlight, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "AbstractRange")]
#[wasm_bindgen(catch, constructor, js_class = "Highlight")]
#[doc = "The `new Highlight(..)` constructor, creating a new instance of `Highlight`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/Highlight)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbstractRange`, `Highlight`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new_3(
initial_ranges_1: &AbstractRange,
initial_ranges_2: &AbstractRange,
initial_ranges_3: &AbstractRange,
) -> Result<Highlight, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "AbstractRange")]
#[wasm_bindgen(catch, constructor, js_class = "Highlight")]
#[doc = "The `new Highlight(..)` constructor, creating a new instance of `Highlight`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/Highlight)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbstractRange`, `Highlight`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new_4(
initial_ranges_1: &AbstractRange,
initial_ranges_2: &AbstractRange,
initial_ranges_3: &AbstractRange,
initial_ranges_4: &AbstractRange,
) -> Result<Highlight, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "AbstractRange")]
#[wasm_bindgen(catch, constructor, js_class = "Highlight")]
#[doc = "The `new Highlight(..)` constructor, creating a new instance of `Highlight`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/Highlight)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbstractRange`, `Highlight`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new_5(
initial_ranges_1: &AbstractRange,
initial_ranges_2: &AbstractRange,
initial_ranges_3: &AbstractRange,
initial_ranges_4: &AbstractRange,
initial_ranges_5: &AbstractRange,
) -> Result<Highlight, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "AbstractRange")]
#[wasm_bindgen(catch, constructor, js_class = "Highlight")]
#[doc = "The `new Highlight(..)` constructor, creating a new instance of `Highlight`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/Highlight)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbstractRange`, `Highlight`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new_6(
initial_ranges_1: &AbstractRange,
initial_ranges_2: &AbstractRange,
initial_ranges_3: &AbstractRange,
initial_ranges_4: &AbstractRange,
initial_ranges_5: &AbstractRange,
initial_ranges_6: &AbstractRange,
) -> Result<Highlight, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "AbstractRange")]
#[wasm_bindgen(catch, constructor, js_class = "Highlight")]
#[doc = "The `new Highlight(..)` constructor, creating a new instance of `Highlight`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/Highlight)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbstractRange`, `Highlight`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new_7(
initial_ranges_1: &AbstractRange,
initial_ranges_2: &AbstractRange,
initial_ranges_3: &AbstractRange,
initial_ranges_4: &AbstractRange,
initial_ranges_5: &AbstractRange,
initial_ranges_6: &AbstractRange,
initial_ranges_7: &AbstractRange,
) -> Result<Highlight, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "AbstractRange")]
# [wasm_bindgen (method , structural , js_class = "Highlight" , js_name = add)]
#[doc = "The `add()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/add)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbstractRange`, `Highlight`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn add(this: &Highlight, value: &AbstractRange) -> Highlight;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (method , structural , js_class = "Highlight" , js_name = clear)]
#[doc = "The `clear()` method."]
#[doc = ""]
Expand All @@ -109,6 +250,18 @@ extern "C" {
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn clear(this: &Highlight);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "AbstractRange")]
# [wasm_bindgen (method , structural , js_class = "Highlight" , js_name = delete)]
#[doc = "The `delete()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/delete)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbstractRange`, `Highlight`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn delete(this: &Highlight, value: &AbstractRange) -> bool;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (method , structural , js_class = "Highlight" , js_name = entries)]
#[doc = "The `entries()` method."]
#[doc = ""]
Expand All @@ -131,6 +284,18 @@ extern "C" {
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn for_each(this: &Highlight, callback: &::js_sys::Function) -> Result<(), JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "AbstractRange")]
# [wasm_bindgen (method , structural , js_class = "Highlight" , js_name = has)]
#[doc = "The `has()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Highlight/has)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AbstractRange`, `Highlight`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn has(this: &Highlight, value: &AbstractRange) -> bool;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (method , structural , js_class = "Highlight" , js_name = keys)]
#[doc = "The `keys()` method."]
#[doc = ""]
Expand Down
2 changes: 1 addition & 1 deletion crates/web-sys/src/features/gen_Range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = Range , typescript_type = "Range")]
# [wasm_bindgen (extends = AbstractRange , extends = :: js_sys :: Object , js_name = Range , typescript_type = "Range")]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `Range` class."]
#[doc = ""]
Expand Down
23 changes: 23 additions & 0 deletions crates/web-sys/src/features/gen_StaticRange.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = AbstractRange , extends = :: js_sys :: Object , js_name = StaticRange , typescript_type = "StaticRange")]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `StaticRange` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/StaticRange)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `StaticRange`*"]
pub type StaticRange;
#[cfg(feature = "StaticRangeInit")]
#[wasm_bindgen(catch, constructor, js_class = "StaticRange")]
#[doc = "The `new StaticRange(..)` constructor, creating a new instance of `StaticRange`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/StaticRange/StaticRange)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `StaticRange`, `StaticRangeInit`*"]
pub fn new(init: &StaticRangeInit) -> Result<StaticRange, JsValue>;
}
Loading
Loading