diff --git a/crates/web-sys/src/features/gen_TaskController.rs b/crates/web-sys/src/features/gen_TaskController.rs index f108a34c42c..3dcb523db71 100644 --- a/crates/web-sys/src/features/gen_TaskController.rs +++ b/crates/web-sys/src/features/gen_TaskController.rs @@ -41,7 +41,7 @@ extern "C" { pub fn new_with_init(init: &TaskControllerInit) -> Result; #[cfg(web_sys_unstable_apis)] #[cfg(feature = "TaskPriority")] - # [wasm_bindgen (method , structural , js_class = "TaskController" , js_name = setPriority)] + # [wasm_bindgen (catch , method , structural , js_class = "TaskController" , js_name = setPriority)] #[doc = "The `setPriority()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TaskController/setPriority)"] @@ -50,5 +50,5 @@ extern "C" { #[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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] - pub fn set_priority(this: &TaskController, priority: TaskPriority); + pub fn set_priority(this: &TaskController, priority: TaskPriority) -> Result<(), JsValue>; } diff --git a/crates/web-sys/webidls/unstable/scheduling-apis.webidl b/crates/web-sys/webidls/unstable/scheduling-apis.webidl index ff89281519c..b63aff54629 100644 --- a/crates/web-sys/webidls/unstable/scheduling-apis.webidl +++ b/crates/web-sys/webidls/unstable/scheduling-apis.webidl @@ -37,6 +37,7 @@ dictionary TaskControllerInit { interface TaskController : AbortController { constructor(optional TaskControllerInit init = {}); + [Throws] undefined setPriority(TaskPriority priority); };