Skip to content

Commit

Permalink
TaskController.setPriority can throw (#3568)
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda authored Aug 25, 2023
1 parent 6788a8f commit 1b136e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/web-sys/src/features/gen_TaskController.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ extern "C" {
pub fn new_with_init(init: &TaskControllerInit) -> Result<TaskController, JsValue>;
#[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)"]
Expand All @@ -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>;
}
1 change: 1 addition & 0 deletions crates/web-sys/webidls/unstable/scheduling-apis.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ dictionary TaskControllerInit {
interface TaskController : AbortController {
constructor(optional TaskControllerInit init = {});

[Throws]
undefined setPriority(TaskPriority priority);
};

Expand Down

0 comments on commit 1b136e3

Please sign in to comment.