mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-05-19 00:51:19 +00:00
Add one more webkit-specific whitelist in web-sys (#1865)
* Add one more webkit-specific whitelist in web-sys * Run rustfmt
This commit is contained in:
parent
db9d603c8f
commit
aa461c363b
@ -465,10 +465,12 @@ impl<'a> Context<'a> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let default_module_path = match self.config.mode {
|
let default_module_path = match self.config.mode {
|
||||||
OutputMode::Web => "\
|
OutputMode::Web => {
|
||||||
|
"\
|
||||||
if (typeof module === 'undefined') {
|
if (typeof module === 'undefined') {
|
||||||
module = import.meta.url.replace(/\\.js$/, '_bg.wasm');
|
module = import.meta.url.replace(/\\.js$/, '_bg.wasm');
|
||||||
}",
|
}"
|
||||||
|
}
|
||||||
_ => "",
|
_ => "",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ fn empty_interface_types() {
|
|||||||
r#"
|
r#"
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern fn foo() {}
|
pub extern fn foo() {}
|
||||||
"#
|
"#,
|
||||||
)
|
)
|
||||||
.file(
|
.file(
|
||||||
"Cargo.toml",
|
"Cargo.toml",
|
||||||
|
@ -130,7 +130,7 @@ impl Task {
|
|||||||
// resources associated with the future ASAP.
|
// resources associated with the future ASAP.
|
||||||
Poll::Ready(()) => {
|
Poll::Ready(()) => {
|
||||||
*borrow = None;
|
*borrow = None;
|
||||||
},
|
}
|
||||||
|
|
||||||
// Unlike `singlethread.rs` we are responsible for ensuring there's
|
// Unlike `singlethread.rs` we are responsible for ensuring there's
|
||||||
// a closure to handle the notification that a Future is ready. In
|
// a closure to handle the notification that a Future is ready. In
|
||||||
|
@ -568,7 +568,7 @@ impl<'src> FirstPassRecord<'src> {
|
|||||||
|
|
||||||
// whitelist a few names that have known polyfills
|
// whitelist a few names that have known polyfills
|
||||||
match name {
|
match name {
|
||||||
"AudioContext" => {
|
"AudioContext" | "OfflineAudioContext" => {
|
||||||
import_type
|
import_type
|
||||||
.vendor_prefixes
|
.vendor_prefixes
|
||||||
.push(Ident::new("webkit", Span::call_site()));
|
.push(Ident::new("webkit", Span::call_site()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user