#[repr(C)]pub struct Navigator {
reflector_: Reflector,
bluetooth: MutNullableDom<Bluetooth>,
plugins: MutNullableDom<PluginArray>,
mime_types: MutNullableDom<MimeTypeArray>,
service_worker: MutNullableDom<ServiceWorkerContainer>,
xr: MutNullableDom<XRSystem>,
mediadevices: MutNullableDom<MediaDevices>,
gamepads: DomRefCell<Vec<MutNullableDom<Gamepad>>>,
permissions: MutNullableDom<Permissions>,
mediasession: MutNullableDom<MediaSession>,
gpu: MutNullableDom<GPU>,
has_gamepad_gesture: Cell<bool>,
}
Fields§
§reflector_: Reflector
§bluetooth: MutNullableDom<Bluetooth>
§plugins: MutNullableDom<PluginArray>
§mime_types: MutNullableDom<MimeTypeArray>
§service_worker: MutNullableDom<ServiceWorkerContainer>
§xr: MutNullableDom<XRSystem>
§mediadevices: MutNullableDom<MediaDevices>
§gamepads: DomRefCell<Vec<MutNullableDom<Gamepad>>>
§permissions: MutNullableDom<Permissions>
§mediasession: MutNullableDom<MediaSession>
§gpu: MutNullableDom<GPU>
§has_gamepad_gesture: Cell<bool>
Implementations§
fn __assert_parent_type(&self)
fn new_inherited() -> Navigator
pub fn new(window: &Window) -> Root<Dom<Navigator>>
pub fn xr(&self) -> Option<Root<Dom<XRSystem>>>
pub fn get_gamepad(&self, index: usize) -> Option<Root<Dom<Gamepad>>>
pub fn set_gamepad(&self, index: usize, gamepad: &Gamepad, can_gc: CanGc)
pub fn remove_gamepad(&self, index: usize)
sourcepub fn select_gamepad_index(&self) -> u32
pub fn select_gamepad_index(&self) -> u32
fn shrink_gamepads_list(&self)
pub fn has_gamepad_gesture(&self) -> bool
pub fn set_has_gamepad_gesture(&self, has_gamepad_gesture: bool)
Trait Implementations§
source§const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>, _: CanGc) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::NavigatorBinding::Navigator_Binding::Wrap as for<'a, 'b> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::navigator::Navigator>, script_runtime::CanGc) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::navigator::Navigator>>}
const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>, _: CanGc) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::NavigatorBinding::Navigator_Binding::Wrap as for<'a, 'b> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::navigator::Navigator>, script_runtime::CanGc) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::navigator::Navigator>>}
Function pointer to the general wrap function type
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§fn MediaDevices(&self) -> Root<Dom<MediaDevices>>
fn MediaDevices(&self) -> Root<Dom<MediaDevices>>
source§fn MediaSession(&self) -> Root<Dom<MediaSession>>
fn MediaSession(&self) -> Root<Dom<MediaSession>>
source§fn HardwareConcurrency(&self) -> u64
fn HardwareConcurrency(&self) -> u64
fn Product(&self) -> DOMString
fn ProductSub(&self) -> DOMString
fn Vendor(&self) -> DOMString
fn VendorSub(&self) -> DOMString
fn TaintEnabled(&self) -> bool
fn AppName(&self) -> DOMString
fn AppCodeName(&self) -> DOMString
fn Platform(&self) -> DOMString
fn UserAgent(&self) -> DOMString
fn AppVersion(&self) -> DOMString
fn Bluetooth(&self) -> Root<Dom<Bluetooth>>
fn Language(&self) -> DOMString
fn Languages(&self, cx: JSContext, retval: MutableHandleValue<'_>)
fn Plugins(&self) -> Root<Dom<PluginArray>>
fn MimeTypes(&self) -> Root<Dom<MimeTypeArray>>
fn JavaEnabled(&self) -> bool
fn ServiceWorker(&self) -> Root<Dom<ServiceWorkerContainer>>
fn CookieEnabled(&self) -> bool
fn Permissions(&self) -> Root<Dom<Permissions>>
fn Gpu(&self) -> Root<Dom<GPU>>
Auto Trait Implementations§
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Filterable for T
impl<T> Filterable for T
source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert