#[repr(C)]pub struct WebWindow;web only.Expand description
Implementations§
Source§impl WebWindow
impl WebWindow
Sourcepub fn document(&self) -> WebDocument
Available on WebAssembly and crate feature unsafe_ffi only.
pub fn document(&self) -> WebDocument
unsafe_ffi only.(document)
Returns the document object.
Sourcepub fn state() -> WebWindowState
Available on WebAssembly and crate feature unsafe_ffi only.
pub fn state() -> WebWindowState
unsafe_ffi only.Returns a new up-to-date WebWindowState.
Sourcepub fn is_closed() -> js_bool
Available on WebAssembly and crate feature unsafe_ffi only.
pub fn is_closed() -> js_bool
unsafe_ffi only.(closed) Whether the current window is closed or not.
Sourcepub fn is_coi() -> js_bool
Available on WebAssembly and crate feature unsafe_ffi only.
pub fn is_coi() -> js_bool
unsafe_ffi only.(crossOriginIsolated) Whether the website is in a cross-origin isolation state.
Sourcepub fn is_secure() -> js_bool
Available on WebAssembly and crate feature unsafe_ffi only.
pub fn is_secure() -> js_bool
unsafe_ffi only.(isSecureContext) Whether the current context is secure.
Sourcepub fn is_popup() -> js_bool
Available on WebAssembly and crate feature unsafe_ffi only.
pub fn is_popup() -> js_bool
unsafe_ffi only.(locationbar) Whether the window is a popup or not.
Sourcepub fn name(buffer: &mut [u8]) -> &str ⓘ
Available on WebAssembly and crate feature unsafe_ffi only.
pub fn name(buffer: &mut [u8]) -> &str ⓘ
unsafe_ffi only.(name) Gets the window name.
Sourcepub fn name_alloc() -> String ⓘ
Available on WebAssembly and crate feature alloc and crate feature unsafe_ffi only.
pub fn name_alloc() -> String ⓘ
alloc and crate feature unsafe_ffi only.(name) Gets the window name.
Sourcepub fn set_name(name: &str)
Available on WebAssembly and crate feature unsafe_ffi only.
pub fn set_name(name: &str)
unsafe_ffi only.(name)
Sets the current window name.
Sourcepub fn set_timeout(callback: extern "C" fn(), delay_ms: js_uint32) -> JsTimeout
Available on WebAssembly and crate feature unsafe_ffi only.
pub fn set_timeout(callback: extern "C" fn(), delay_ms: js_uint32) -> JsTimeout
unsafe_ffi only.(setTimeout) Calls a function after a delay in milliseconds.
Sourcepub fn set_interval(
callback: extern "C" fn(),
interval_ms: js_uint32,
) -> JsTimeout
Available on WebAssembly and crate feature unsafe_ffi only.
pub fn set_interval( callback: extern "C" fn(), interval_ms: js_uint32, ) -> JsTimeout
unsafe_ffi only.(setInterval) Calls a function repeatedly at a fixed interval in milliseconds.
Sourcepub fn clear_timeout(id: JsTimeout)
Available on WebAssembly and crate feature unsafe_ffi only.
pub fn clear_timeout(id: JsTimeout)
unsafe_ffi only.(clearTimeout) (clearInterval) Cancels a timeout or interval.
Sourcepub fn eval(js_code: &str)
Available on WebAssembly and crate feature unsafe_ffi only.
pub fn eval(js_code: &str)
unsafe_ffi only.Executes JavaScript code immediately.
§Security Warning
- Avoid passing untrusted input, as this executes arbitrary JS.
- Ensure all evaluated code is safe and controlled.
Sourcepub fn eval_timeout(js_code: &str, delay_ms: js_uint32) -> JsTimeout
Available on WebAssembly and crate feature unsafe_ffi only.
pub fn eval_timeout(js_code: &str, delay_ms: js_uint32) -> JsTimeout
unsafe_ffi only.(setTimeout) Executes JavaScript code after a delay in milliseconds.
Sourcepub fn eval_interval(js_code: &str, interval_ms: js_uint32) -> JsTimeout
Available on WebAssembly and crate feature unsafe_ffi only.
pub fn eval_interval(js_code: &str, interval_ms: js_uint32) -> JsTimeout
unsafe_ffi only.(setInterval) Executes JavaScript code repeatedly at a fixed interval in milliseconds.
Sourcepub fn request_animation_frame(callback: extern "C" fn()) -> js_uint32
Available on WebAssembly and crate feature unsafe_ffi only.
pub fn request_animation_frame(callback: extern "C" fn()) -> js_uint32
unsafe_ffi only.(requestAnimationFrame)
Requests an animation frame, executing the given callback.
Sourcepub fn cancel_animation_frame(id: js_uint32)
Available on WebAssembly and crate feature unsafe_ffi only.
pub fn cancel_animation_frame(id: js_uint32)
unsafe_ffi only.Cancels a request for an animation frame.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WebWindow
impl RefUnwindSafe for WebWindow
impl Send for WebWindow
impl Sync for WebWindow
impl Unpin for WebWindow
impl UnsafeUnpin for WebWindow
impl UnwindSafe for WebWindow
Blanket Implementations§
Source§impl<T> AnyExt for T
impl<T> AnyExt for T
Source§fn type_hash_with<H: Hasher>(&self, hasher: H) -> u64
fn type_hash_with<H: Hasher>(&self, hasher: H) -> u64
TypeId of Self using a custom hasher.Source§fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
Source§fn as_any_box(self: Box<Self>) -> Box<dyn Any>where
Self: Sized,
fn as_any_box(self: Box<Self>) -> Box<dyn Any>where
Self: Sized,
alloc only.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> ByteSized for T
impl<T> ByteSized for T
Source§const BYTE_ALIGN: usize = _
const BYTE_ALIGN: usize = _
Source§fn byte_align(&self) -> usize
fn byte_align(&self) -> usize
Source§fn ptr_size_ratio(&self) -> [usize; 2]
fn ptr_size_ratio(&self) -> [usize; 2]
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> MemExt for Twhere
T: ?Sized,
impl<T> MemExt for Twhere
T: ?Sized,
Source§const NEEDS_DROP: bool = _
const NEEDS_DROP: bool = _
Source§fn mem_align_of<T>() -> usize
fn mem_align_of<T>() -> usize
Source§fn mem_align_of_val(&self) -> usize
fn mem_align_of_val(&self) -> usize
Source§fn mem_size_of<T>() -> usize
fn mem_size_of<T>() -> usize
Source§fn mem_size_of_val(&self) -> usize
fn mem_size_of_val(&self) -> usize
Source§fn mem_needs_drop(&self) -> bool
fn mem_needs_drop(&self) -> bool
true if dropping values of this type matters. Read moreSource§fn mem_forget(self)where
Self: Sized,
fn mem_forget(self)where
Self: Sized,
self without running its destructor. Read moreSource§fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
Source§unsafe fn mem_zeroed<T>() -> T
unsafe fn mem_zeroed<T>() -> T
unsafe_layout only.T represented by the all-zero byte-pattern. Read moreSource§unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe_layout only.T represented by the all-zero byte-pattern. Read moreSource§fn mem_as_bytes(&self) -> &[u8] ⓘ
fn mem_as_bytes(&self) -> &[u8] ⓘ
unsafe_slice only.