Platform is called Web not Wasm (#3393)

This commit is contained in:
daxpedda 2024-01-14 18:54:52 +01:00 committed by GitHub
parent 2ee44246ae
commit 16d860736b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 57 additions and 57 deletions

View file

@ -14,7 +14,7 @@ pub mod orbital;
pub mod startup_notify;
#[cfg(any(wayland_platform, docsrs))]
pub mod wayland;
#[cfg(any(wasm_platform, docsrs))]
#[cfg(any(web_platform, docsrs))]
pub mod web;
#[cfg(any(windows_platform, docsrs))]
pub mod windows;

View file

@ -58,7 +58,7 @@ pub trait EventLoopExtRunOnDemand {
/// - **iOS:** It's not possible to stop and start an `NSApplication` repeatedly on iOS.
///
#[cfg_attr(
not(wasm_platform),
not(web_platform),
doc = "[^1]: `spawn()` is only available on `wasm` platforms."
)]
///

View file

@ -34,18 +34,18 @@ use std::pin::Pin;
use std::task::{Context, Poll};
use std::time::Duration;
#[cfg(wasm_platform)]
#[cfg(web_platform)]
use web_sys::HtmlCanvasElement;
use crate::cursor::CustomCursorBuilder;
use crate::event::Event;
use crate::event_loop::{EventLoop, EventLoopWindowTarget};
#[cfg(wasm_platform)]
#[cfg(web_platform)]
use crate::platform_impl::CustomCursorFuture as PlatformCustomCursorFuture;
use crate::platform_impl::{PlatformCustomCursor, PlatformCustomCursorBuilder};
use crate::window::{CustomCursor, Window, WindowBuilder};
#[cfg(not(wasm_platform))]
#[cfg(not(web_platform))]
#[doc(hidden)]
pub struct HtmlCanvasElement;
@ -93,7 +93,7 @@ pub trait WindowBuilderExtWebSys {
///
/// [`None`] by default.
#[cfg_attr(
not(wasm_platform),
not(web_platform),
doc = "",
doc = "[`HtmlCanvasElement`]: #only-available-on-wasm"
)]
@ -150,11 +150,11 @@ pub trait EventLoopExtWebSys {
///
/// Unlike
#[cfg_attr(
all(wasm_platform, target_feature = "exception-handling"),
all(web_platform, target_feature = "exception-handling"),
doc = "`run()`"
)]
#[cfg_attr(
not(all(wasm_platform, target_feature = "exception-handling")),
not(all(web_platform, target_feature = "exception-handling")),
doc = "[`run()`]"
)]
/// [^1], this returns immediately, and doesn't throw an exception in order to
@ -166,7 +166,7 @@ pub trait EventLoopExtWebSys {
/// event loop when switching between tabs on a single page application.
///
#[cfg_attr(
not(all(wasm_platform, target_feature = "exception-handling")),
not(all(web_platform, target_feature = "exception-handling")),
doc = "[`run()`]: EventLoop::run()"
)]
/// [^1]: `run()` is _not_ available on WASM when the target supports `exception-handling`.
@ -327,7 +327,7 @@ impl CustomCursorBuilderExtWebSys for CustomCursorBuilder {
}
}
#[cfg(not(wasm_platform))]
#[cfg(not(web_platform))]
struct PlatformCustomCursorFuture;
#[derive(Debug)]