diff --git a/CHANGELOG.md b/CHANGELOG.md index f83e91261fd..b7f4343d59c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,11 @@ * Add bindings for `UserActivation`. [#3719](https://github.com/rustwasm/wasm-bindgen/pull/3719) +### Changed + +* Stabilize File System API. + [#3745](https://github.com/rustwasm/wasm-bindgen/pull/3745) + ### Fixed * Fixed a compiler error when using `#[wasm_bindgen]` inside `macro_rules!`. diff --git a/crates/web-sys/src/features/gen_FileSystemCreateWritableOptions.rs b/crates/web-sys/src/features/gen_FileSystemCreateWritableOptions.rs index 76ebad99837..b8a1f135ebd 100644 --- a/crates/web-sys/src/features/gen_FileSystemCreateWritableOptions.rs +++ b/crates/web-sys/src/features/gen_FileSystemCreateWritableOptions.rs @@ -2,7 +2,6 @@ #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; -#[cfg(web_sys_unstable_apis)] #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = :: js_sys :: Object , js_name = FileSystemCreateWritableOptions)] @@ -10,31 +9,20 @@ extern "C" { #[doc = "The `FileSystemCreateWritableOptions` dictionary."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemCreateWritableOptions`*"] - #[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 type FileSystemCreateWritableOptions; } -#[cfg(web_sys_unstable_apis)] impl FileSystemCreateWritableOptions { #[doc = "Construct a new `FileSystemCreateWritableOptions`."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemCreateWritableOptions`*"] - #[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 new() -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[cfg(web_sys_unstable_apis)] #[doc = "Change the `keepExistingData` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemCreateWritableOptions`*"] - #[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 keep_existing_data(&mut self, val: bool) -> &mut Self { use wasm_bindgen::JsValue; let r = ::js_sys::Reflect::set( @@ -50,7 +38,6 @@ impl FileSystemCreateWritableOptions { self } } -#[cfg(web_sys_unstable_apis)] impl Default for FileSystemCreateWritableOptions { fn default() -> Self { Self::new() diff --git a/crates/web-sys/src/features/gen_FileSystemDirectoryHandle.rs b/crates/web-sys/src/features/gen_FileSystemDirectoryHandle.rs index 9487482f35b..cfac88f43e0 100644 --- a/crates/web-sys/src/features/gen_FileSystemDirectoryHandle.rs +++ b/crates/web-sys/src/features/gen_FileSystemDirectoryHandle.rs @@ -2,7 +2,6 @@ #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; -#[cfg(web_sys_unstable_apis)] #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = FileSystemHandle , extends = :: js_sys :: Object , js_name = FileSystemDirectoryHandle , typescript_type = "FileSystemDirectoryHandle")] @@ -12,22 +11,14 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryHandle)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemDirectoryHandle`*"] - #[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 type FileSystemDirectoryHandle; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (method , structural , js_class = "FileSystemDirectoryHandle" , js_name = getDirectoryHandle)] #[doc = "The `getDirectoryHandle()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryHandle/getDirectoryHandle)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemDirectoryHandle`*"] - #[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 get_directory_handle(this: &FileSystemDirectoryHandle, name: &str) -> ::js_sys::Promise; - #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemGetDirectoryOptions")] # [wasm_bindgen (method , structural , js_class = "FileSystemDirectoryHandle" , js_name = getDirectoryHandle)] #[doc = "The `getDirectoryHandle()` method."] @@ -35,26 +26,18 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryHandle/getDirectoryHandle)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemDirectoryHandle`, `FileSystemGetDirectoryOptions`*"] - #[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 get_directory_handle_with_options( this: &FileSystemDirectoryHandle, name: &str, options: &FileSystemGetDirectoryOptions, ) -> ::js_sys::Promise; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (method , structural , js_class = "FileSystemDirectoryHandle" , js_name = getFileHandle)] #[doc = "The `getFileHandle()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryHandle/getFileHandle)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemDirectoryHandle`*"] - #[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 get_file_handle(this: &FileSystemDirectoryHandle, name: &str) -> ::js_sys::Promise; - #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemGetFileOptions")] # [wasm_bindgen (method , structural , js_class = "FileSystemDirectoryHandle" , js_name = getFileHandle)] #[doc = "The `getFileHandle()` method."] @@ -62,26 +45,18 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryHandle/getFileHandle)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemDirectoryHandle`, `FileSystemGetFileOptions`*"] - #[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 get_file_handle_with_options( this: &FileSystemDirectoryHandle, name: &str, options: &FileSystemGetFileOptions, ) -> ::js_sys::Promise; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (method , structural , js_class = "FileSystemDirectoryHandle" , js_name = removeEntry)] #[doc = "The `removeEntry()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryHandle/removeEntry)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemDirectoryHandle`*"] - #[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 remove_entry(this: &FileSystemDirectoryHandle, name: &str) -> ::js_sys::Promise; - #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemRemoveOptions")] # [wasm_bindgen (method , structural , js_class = "FileSystemDirectoryHandle" , js_name = removeEntry)] #[doc = "The `removeEntry()` method."] @@ -89,24 +64,17 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryHandle/removeEntry)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemDirectoryHandle`, `FileSystemRemoveOptions`*"] - #[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 remove_entry_with_options( this: &FileSystemDirectoryHandle, name: &str, options: &FileSystemRemoveOptions, ) -> ::js_sys::Promise; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (method , structural , js_class = "FileSystemDirectoryHandle" , js_name = resolve)] #[doc = "The `resolve()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryHandle/resolve)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemDirectoryHandle`*"] - #[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 resolve( this: &FileSystemDirectoryHandle, possible_descendant: &FileSystemHandle, diff --git a/crates/web-sys/src/features/gen_FileSystemFileHandle.rs b/crates/web-sys/src/features/gen_FileSystemFileHandle.rs index c11c88e59b4..b22d79832ef 100644 --- a/crates/web-sys/src/features/gen_FileSystemFileHandle.rs +++ b/crates/web-sys/src/features/gen_FileSystemFileHandle.rs @@ -2,7 +2,6 @@ #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; -#[cfg(web_sys_unstable_apis)] #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = FileSystemHandle , extends = :: js_sys :: Object , js_name = FileSystemFileHandle , typescript_type = "FileSystemFileHandle")] @@ -12,33 +11,21 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemFileHandle`*"] - #[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 type FileSystemFileHandle; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (method , structural , js_class = "FileSystemFileHandle" , js_name = createSyncAccessHandle)] #[doc = "The `createSyncAccessHandle()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle/createSyncAccessHandle)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemFileHandle`*"] - #[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 create_sync_access_handle(this: &FileSystemFileHandle) -> ::js_sys::Promise; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (method , structural , js_class = "FileSystemFileHandle" , js_name = createWritable)] #[doc = "The `createWritable()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle/createWritable)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemFileHandle`*"] - #[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 create_writable(this: &FileSystemFileHandle) -> ::js_sys::Promise; - #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemCreateWritableOptions")] # [wasm_bindgen (method , structural , js_class = "FileSystemFileHandle" , js_name = createWritable)] #[doc = "The `createWritable()` method."] @@ -46,22 +33,15 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle/createWritable)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemCreateWritableOptions`, `FileSystemFileHandle`*"] - #[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 create_writable_with_options( this: &FileSystemFileHandle, options: &FileSystemCreateWritableOptions, ) -> ::js_sys::Promise; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (method , structural , js_class = "FileSystemFileHandle" , js_name = getFile)] #[doc = "The `getFile()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle/getFile)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemFileHandle`*"] - #[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 get_file(this: &FileSystemFileHandle) -> ::js_sys::Promise; } diff --git a/crates/web-sys/src/features/gen_FileSystemGetDirectoryOptions.rs b/crates/web-sys/src/features/gen_FileSystemGetDirectoryOptions.rs index a26ba73562c..e5f3e136a8c 100644 --- a/crates/web-sys/src/features/gen_FileSystemGetDirectoryOptions.rs +++ b/crates/web-sys/src/features/gen_FileSystemGetDirectoryOptions.rs @@ -2,7 +2,6 @@ #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; -#[cfg(web_sys_unstable_apis)] #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = :: js_sys :: Object , js_name = FileSystemGetDirectoryOptions)] @@ -10,31 +9,20 @@ extern "C" { #[doc = "The `FileSystemGetDirectoryOptions` dictionary."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemGetDirectoryOptions`*"] - #[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 type FileSystemGetDirectoryOptions; } -#[cfg(web_sys_unstable_apis)] impl FileSystemGetDirectoryOptions { #[doc = "Construct a new `FileSystemGetDirectoryOptions`."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemGetDirectoryOptions`*"] - #[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 new() -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[cfg(web_sys_unstable_apis)] #[doc = "Change the `create` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemGetDirectoryOptions`*"] - #[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 create(&mut self, val: bool) -> &mut Self { use wasm_bindgen::JsValue; let r = @@ -47,7 +35,6 @@ impl FileSystemGetDirectoryOptions { self } } -#[cfg(web_sys_unstable_apis)] impl Default for FileSystemGetDirectoryOptions { fn default() -> Self { Self::new() diff --git a/crates/web-sys/src/features/gen_FileSystemGetFileOptions.rs b/crates/web-sys/src/features/gen_FileSystemGetFileOptions.rs index 08dbf37c6dd..8cc7a410c09 100644 --- a/crates/web-sys/src/features/gen_FileSystemGetFileOptions.rs +++ b/crates/web-sys/src/features/gen_FileSystemGetFileOptions.rs @@ -2,7 +2,6 @@ #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; -#[cfg(web_sys_unstable_apis)] #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = :: js_sys :: Object , js_name = FileSystemGetFileOptions)] @@ -10,31 +9,20 @@ extern "C" { #[doc = "The `FileSystemGetFileOptions` dictionary."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemGetFileOptions`*"] - #[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 type FileSystemGetFileOptions; } -#[cfg(web_sys_unstable_apis)] impl FileSystemGetFileOptions { #[doc = "Construct a new `FileSystemGetFileOptions`."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemGetFileOptions`*"] - #[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 new() -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[cfg(web_sys_unstable_apis)] #[doc = "Change the `create` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemGetFileOptions`*"] - #[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 create(&mut self, val: bool) -> &mut Self { use wasm_bindgen::JsValue; let r = @@ -47,7 +35,6 @@ impl FileSystemGetFileOptions { self } } -#[cfg(web_sys_unstable_apis)] impl Default for FileSystemGetFileOptions { fn default() -> Self { Self::new() diff --git a/crates/web-sys/src/features/gen_FileSystemHandle.rs b/crates/web-sys/src/features/gen_FileSystemHandle.rs index 35e9b66bb2b..6a019fe67db 100644 --- a/crates/web-sys/src/features/gen_FileSystemHandle.rs +++ b/crates/web-sys/src/features/gen_FileSystemHandle.rs @@ -2,7 +2,6 @@ #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; -#[cfg(web_sys_unstable_apis)] #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = :: js_sys :: Object , js_name = FileSystemHandle , typescript_type = "FileSystemHandle")] @@ -12,11 +11,7 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemHandle)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemHandle`*"] - #[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 type FileSystemHandle; - #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemHandleKind")] # [wasm_bindgen (structural , method , getter , js_class = "FileSystemHandle" , js_name = kind)] #[doc = "Getter for the `kind` field of this object."] @@ -24,30 +19,19 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemHandle/kind)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemHandle`, `FileSystemHandleKind`*"] - #[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 kind(this: &FileSystemHandle) -> FileSystemHandleKind; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (structural , method , getter , js_class = "FileSystemHandle" , js_name = name)] #[doc = "Getter for the `name` field of this object."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemHandle/name)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemHandle`*"] - #[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 name(this: &FileSystemHandle) -> String; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (method , structural , js_class = "FileSystemHandle" , js_name = isSameEntry)] #[doc = "The `isSameEntry()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemHandle/isSameEntry)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemHandle`*"] - #[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 is_same_entry(this: &FileSystemHandle, other: &FileSystemHandle) -> ::js_sys::Promise; } diff --git a/crates/web-sys/src/features/gen_FileSystemHandleKind.rs b/crates/web-sys/src/features/gen_FileSystemHandleKind.rs index 8dfa38a30d1..4cb6fdb6fe6 100644 --- a/crates/web-sys/src/features/gen_FileSystemHandleKind.rs +++ b/crates/web-sys/src/features/gen_FileSystemHandleKind.rs @@ -1,14 +1,10 @@ #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; -#[cfg(web_sys_unstable_apis)] #[wasm_bindgen] #[doc = "The `FileSystemHandleKind` enum."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemHandleKind`*"] -#[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)*"] #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum FileSystemHandleKind { File = "file", diff --git a/crates/web-sys/src/features/gen_FileSystemReadWriteOptions.rs b/crates/web-sys/src/features/gen_FileSystemReadWriteOptions.rs index 1188a945f1e..209b2af448b 100644 --- a/crates/web-sys/src/features/gen_FileSystemReadWriteOptions.rs +++ b/crates/web-sys/src/features/gen_FileSystemReadWriteOptions.rs @@ -2,7 +2,6 @@ #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; -#[cfg(web_sys_unstable_apis)] #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = :: js_sys :: Object , js_name = FileSystemReadWriteOptions)] @@ -10,31 +9,20 @@ extern "C" { #[doc = "The `FileSystemReadWriteOptions` dictionary."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemReadWriteOptions`*"] - #[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 type FileSystemReadWriteOptions; } -#[cfg(web_sys_unstable_apis)] impl FileSystemReadWriteOptions { #[doc = "Construct a new `FileSystemReadWriteOptions`."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemReadWriteOptions`*"] - #[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 new() -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[cfg(web_sys_unstable_apis)] #[doc = "Change the `at` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemReadWriteOptions`*"] - #[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 at(&mut self, val: f64) -> &mut Self { use wasm_bindgen::JsValue; let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("at"), &JsValue::from(val)); @@ -46,7 +34,6 @@ impl FileSystemReadWriteOptions { self } } -#[cfg(web_sys_unstable_apis)] impl Default for FileSystemReadWriteOptions { fn default() -> Self { Self::new() diff --git a/crates/web-sys/src/features/gen_FileSystemRemoveOptions.rs b/crates/web-sys/src/features/gen_FileSystemRemoveOptions.rs index a0e895dfce3..3f81a31cef0 100644 --- a/crates/web-sys/src/features/gen_FileSystemRemoveOptions.rs +++ b/crates/web-sys/src/features/gen_FileSystemRemoveOptions.rs @@ -2,7 +2,6 @@ #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; -#[cfg(web_sys_unstable_apis)] #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = :: js_sys :: Object , js_name = FileSystemRemoveOptions)] @@ -10,31 +9,20 @@ extern "C" { #[doc = "The `FileSystemRemoveOptions` dictionary."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemRemoveOptions`*"] - #[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 type FileSystemRemoveOptions; } -#[cfg(web_sys_unstable_apis)] impl FileSystemRemoveOptions { #[doc = "Construct a new `FileSystemRemoveOptions`."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemRemoveOptions`*"] - #[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 new() -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } - #[cfg(web_sys_unstable_apis)] #[doc = "Change the `recursive` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemRemoveOptions`*"] - #[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 recursive(&mut self, val: bool) -> &mut Self { use wasm_bindgen::JsValue; let r = ::js_sys::Reflect::set( @@ -50,7 +38,6 @@ impl FileSystemRemoveOptions { self } } -#[cfg(web_sys_unstable_apis)] impl Default for FileSystemRemoveOptions { fn default() -> Self { Self::new() diff --git a/crates/web-sys/src/features/gen_FileSystemSyncAccessHandle.rs b/crates/web-sys/src/features/gen_FileSystemSyncAccessHandle.rs index 8b293264f7c..beaac4a129d 100644 --- a/crates/web-sys/src/features/gen_FileSystemSyncAccessHandle.rs +++ b/crates/web-sys/src/features/gen_FileSystemSyncAccessHandle.rs @@ -2,7 +2,6 @@ #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; -#[cfg(web_sys_unstable_apis)] #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = :: js_sys :: Object , js_name = FileSystemSyncAccessHandle , typescript_type = "FileSystemSyncAccessHandle")] @@ -12,72 +11,48 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandle`*"] - #[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 type FileSystemSyncAccessHandle; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = close)] #[doc = "The `close()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/close)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandle`*"] - #[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 close(this: &FileSystemSyncAccessHandle); - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = flush)] #[doc = "The `flush()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/flush)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandle`*"] - #[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 flush(this: &FileSystemSyncAccessHandle) -> Result<(), JsValue>; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = getSize)] #[doc = "The `getSize()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/getSize)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandle`*"] - #[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 get_size(this: &FileSystemSyncAccessHandle) -> Result; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = read)] #[doc = "The `read()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/read)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandle`*"] - #[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 read_with_buffer_source( this: &FileSystemSyncAccessHandle, buffer: &::js_sys::Object, ) -> Result; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = read)] #[doc = "The `read()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/read)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandle`*"] - #[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 read_with_u8_array( this: &FileSystemSyncAccessHandle, buffer: &mut [u8], ) -> Result; - #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemReadWriteOptions")] # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = read)] #[doc = "The `read()` method."] @@ -85,15 +60,11 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/read)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemReadWriteOptions`, `FileSystemSyncAccessHandle`*"] - #[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 read_with_buffer_source_and_options( this: &FileSystemSyncAccessHandle, buffer: &::js_sys::Object, options: &FileSystemReadWriteOptions, ) -> Result; - #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemReadWriteOptions")] # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = read)] #[doc = "The `read()` method."] @@ -101,71 +72,51 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/read)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemReadWriteOptions`, `FileSystemSyncAccessHandle`*"] - #[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 read_with_u8_array_and_options( this: &FileSystemSyncAccessHandle, buffer: &mut [u8], options: &FileSystemReadWriteOptions, ) -> Result; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = truncate)] #[doc = "The `truncate()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/truncate)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandle`*"] - #[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 truncate_with_u32( this: &FileSystemSyncAccessHandle, new_size: u32, ) -> Result<(), JsValue>; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = truncate)] #[doc = "The `truncate()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/truncate)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandle`*"] - #[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 truncate_with_f64( this: &FileSystemSyncAccessHandle, new_size: f64, ) -> Result<(), JsValue>; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = write)] #[doc = "The `write()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/write)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandle`*"] - #[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 write_with_buffer_source( this: &FileSystemSyncAccessHandle, buffer: &::js_sys::Object, ) -> Result; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = write)] #[doc = "The `write()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/write)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemSyncAccessHandle`*"] - #[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 write_with_u8_array( this: &FileSystemSyncAccessHandle, buffer: &[u8], ) -> Result; - #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemReadWriteOptions")] # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = write)] #[doc = "The `write()` method."] @@ -173,15 +124,11 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/write)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemReadWriteOptions`, `FileSystemSyncAccessHandle`*"] - #[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 write_with_buffer_source_and_options( this: &FileSystemSyncAccessHandle, buffer: &::js_sys::Object, options: &FileSystemReadWriteOptions, ) -> Result; - #[cfg(web_sys_unstable_apis)] #[cfg(feature = "FileSystemReadWriteOptions")] # [wasm_bindgen (catch , method , structural , js_class = "FileSystemSyncAccessHandle" , js_name = write)] #[doc = "The `write()` method."] @@ -189,9 +136,6 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemSyncAccessHandle/write)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemReadWriteOptions`, `FileSystemSyncAccessHandle`*"] - #[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 write_with_u8_array_and_options( this: &FileSystemSyncAccessHandle, buffer: &[u8], diff --git a/crates/web-sys/src/features/gen_FileSystemWritableFileStream.rs b/crates/web-sys/src/features/gen_FileSystemWritableFileStream.rs index 56f11326193..8732dfc2721 100644 --- a/crates/web-sys/src/features/gen_FileSystemWritableFileStream.rs +++ b/crates/web-sys/src/features/gen_FileSystemWritableFileStream.rs @@ -2,7 +2,6 @@ #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; -#[cfg(web_sys_unstable_apis)] #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = WritableStream , extends = :: js_sys :: Object , js_name = FileSystemWritableFileStream , typescript_type = "FileSystemWritableFileStream")] @@ -12,95 +11,67 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemWritableFileStream)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemWritableFileStream`*"] - #[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 type FileSystemWritableFileStream; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (catch , method , structural , js_class = "FileSystemWritableFileStream" , js_name = seek)] #[doc = "The `seek()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemWritableFileStream/seek)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemWritableFileStream`*"] - #[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 seek_with_u32( this: &FileSystemWritableFileStream, position: u32, ) -> Result<::js_sys::Promise, JsValue>; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (catch , method , structural , js_class = "FileSystemWritableFileStream" , js_name = seek)] #[doc = "The `seek()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemWritableFileStream/seek)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemWritableFileStream`*"] - #[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 seek_with_f64( this: &FileSystemWritableFileStream, position: f64, ) -> Result<::js_sys::Promise, JsValue>; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (catch , method , structural , js_class = "FileSystemWritableFileStream" , js_name = truncate)] #[doc = "The `truncate()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemWritableFileStream/truncate)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemWritableFileStream`*"] - #[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 truncate_with_u32( this: &FileSystemWritableFileStream, size: u32, ) -> Result<::js_sys::Promise, JsValue>; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (catch , method , structural , js_class = "FileSystemWritableFileStream" , js_name = truncate)] #[doc = "The `truncate()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemWritableFileStream/truncate)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemWritableFileStream`*"] - #[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 truncate_with_f64( this: &FileSystemWritableFileStream, size: f64, ) -> Result<::js_sys::Promise, JsValue>; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (catch , method , structural , js_class = "FileSystemWritableFileStream" , js_name = write)] #[doc = "The `write()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemWritableFileStream/write)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemWritableFileStream`*"] - #[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 write_with_buffer_source( this: &FileSystemWritableFileStream, data: &::js_sys::Object, ) -> Result<::js_sys::Promise, JsValue>; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (catch , method , structural , js_class = "FileSystemWritableFileStream" , js_name = write)] #[doc = "The `write()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemWritableFileStream/write)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemWritableFileStream`*"] - #[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 write_with_u8_array( this: &FileSystemWritableFileStream, data: &[u8], ) -> Result<::js_sys::Promise, JsValue>; - #[cfg(web_sys_unstable_apis)] #[cfg(feature = "Blob")] # [wasm_bindgen (catch , method , structural , js_class = "FileSystemWritableFileStream" , js_name = write)] #[doc = "The `write()` method."] @@ -108,28 +79,20 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemWritableFileStream/write)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Blob`, `FileSystemWritableFileStream`*"] - #[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 write_with_blob( this: &FileSystemWritableFileStream, data: &Blob, ) -> Result<::js_sys::Promise, JsValue>; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (catch , method , structural , js_class = "FileSystemWritableFileStream" , js_name = write)] #[doc = "The `write()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemWritableFileStream/write)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemWritableFileStream`*"] - #[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 write_with_str( this: &FileSystemWritableFileStream, data: &str, ) -> Result<::js_sys::Promise, JsValue>; - #[cfg(web_sys_unstable_apis)] #[cfg(feature = "WriteParams")] # [wasm_bindgen (catch , method , structural , js_class = "FileSystemWritableFileStream" , js_name = write)] #[doc = "The `write()` method."] @@ -137,9 +100,6 @@ extern "C" { #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileSystemWritableFileStream/write)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemWritableFileStream`, `WriteParams`*"] - #[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 write_with_write_params( this: &FileSystemWritableFileStream, data: &WriteParams, diff --git a/crates/web-sys/src/features/gen_StorageManager.rs b/crates/web-sys/src/features/gen_StorageManager.rs index 1c10d761046..2bb5782ebf0 100644 --- a/crates/web-sys/src/features/gen_StorageManager.rs +++ b/crates/web-sys/src/features/gen_StorageManager.rs @@ -19,16 +19,12 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StorageManager`*"] pub fn estimate(this: &StorageManager) -> Result<::js_sys::Promise, JsValue>; - #[cfg(web_sys_unstable_apis)] # [wasm_bindgen (method , structural , js_class = "StorageManager" , js_name = getDirectory)] #[doc = "The `getDirectory()` method."] #[doc = ""] #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/StorageManager/getDirectory)"] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StorageManager`*"] - #[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 get_directory(this: &StorageManager) -> ::js_sys::Promise; # [wasm_bindgen (catch , method , structural , js_class = "StorageManager" , js_name = persist)] #[doc = "The `persist()` method."] diff --git a/crates/web-sys/src/features/gen_WriteCommandType.rs b/crates/web-sys/src/features/gen_WriteCommandType.rs index 7a4f3684cc3..eb962259d79 100644 --- a/crates/web-sys/src/features/gen_WriteCommandType.rs +++ b/crates/web-sys/src/features/gen_WriteCommandType.rs @@ -1,14 +1,10 @@ #![allow(unused_imports)] #![allow(clippy::all)] use wasm_bindgen::prelude::*; -#[cfg(web_sys_unstable_apis)] #[wasm_bindgen] #[doc = "The `WriteCommandType` enum."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WriteCommandType`*"] -#[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)*"] #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum WriteCommandType { Write = "write", diff --git a/crates/web-sys/src/features/gen_WriteParams.rs b/crates/web-sys/src/features/gen_WriteParams.rs index a142040f851..06af78da20c 100644 --- a/crates/web-sys/src/features/gen_WriteParams.rs +++ b/crates/web-sys/src/features/gen_WriteParams.rs @@ -2,7 +2,6 @@ #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; -#[cfg(web_sys_unstable_apis)] #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = :: js_sys :: Object , js_name = WriteParams)] @@ -10,33 +9,22 @@ extern "C" { #[doc = "The `WriteParams` dictionary."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] - #[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 type WriteParams; } -#[cfg(web_sys_unstable_apis)] impl WriteParams { #[cfg(feature = "WriteCommandType")] #[doc = "Construct a new `WriteParams`."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WriteCommandType`, `WriteParams`*"] - #[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 new(type_: WriteCommandType) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret.type_(type_); ret } - #[cfg(web_sys_unstable_apis)] #[doc = "Change the `data` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] - #[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 data(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self { use wasm_bindgen::JsValue; let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("data"), &JsValue::from(val)); @@ -47,13 +35,9 @@ impl WriteParams { let _ = r; self } - #[cfg(web_sys_unstable_apis)] #[doc = "Change the `position` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] - #[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 position(&mut self, val: Option) -> &mut Self { use wasm_bindgen::JsValue; let r = ::js_sys::Reflect::set( @@ -68,13 +52,9 @@ impl WriteParams { let _ = r; self } - #[cfg(web_sys_unstable_apis)] #[doc = "Change the `size` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] - #[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 size(&mut self, val: Option) -> &mut Self { use wasm_bindgen::JsValue; let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("size"), &JsValue::from(val)); @@ -85,14 +65,10 @@ impl WriteParams { let _ = r; self } - #[cfg(web_sys_unstable_apis)] #[cfg(feature = "WriteCommandType")] #[doc = "Change the `type` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WriteCommandType`, `WriteParams`*"] - #[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 type_(&mut self, val: WriteCommandType) -> &mut Self { use wasm_bindgen::JsValue; let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("type"), &JsValue::from(val)); diff --git a/crates/web-sys/webidls/unstable/FileSystemAccess.webidl b/crates/web-sys/webidls/enabled/FileSystemAccess.webidl similarity index 100% rename from crates/web-sys/webidls/unstable/FileSystemAccess.webidl rename to crates/web-sys/webidls/enabled/FileSystemAccess.webidl