Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put FontFace constructor to Immutable slice whitelist #3072

Merged
merged 2 commits into from Sep 6, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/web-sys/src/features/gen_FontFace.rs
Expand Up @@ -185,7 +185,7 @@ extern "C" {
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `FontFace`*"]
pub fn new_with_u8_array(family: &str, source: &mut [u8]) -> Result<FontFace, JsValue>;
pub fn new_with_u8_array(family: &str, source: &[u8]) -> Result<FontFace, JsValue>;
#[cfg(feature = "FontFaceDescriptors")]
#[wasm_bindgen(catch, constructor, js_class = "FontFace")]
#[doc = "The `new FontFace(..)` constructor, creating a new instance of `FontFace`."]
Expand Down Expand Up @@ -231,7 +231,7 @@ extern "C" {
#[doc = "*This API requires the following crate features to be activated: `FontFace`, `FontFaceDescriptors`*"]
pub fn new_with_u8_array_and_descriptors(
family: &str,
source: &mut [u8],
source: &[u8],
descriptors: &FontFaceDescriptors,
) -> Result<FontFace, JsValue>;
# [wasm_bindgen (catch , method , structural , js_class = "FontFace" , js_name = load)]
Expand Down
4 changes: 3 additions & 1 deletion crates/webidl/src/constants.rs
Expand Up @@ -87,6 +87,8 @@ pub(crate) static IMMUTABLE_SLICE_WHITELIST: Lazy<BTreeSet<&'static str>> = Lazy
"writeBuffer",
"writeTexture",
// AudioBuffer
"copyToChannel", // TODO: Add another type's functions here. Leave a comment header with the type name
"copyToChannel",
// FontFace
"FontFace", // TODO: Add another type's functions here. Leave a comment header with the type name
])
});