pub(crate) type WindowProxyOrMessagePortOrServiceWorker = WindowProxyOrMessagePortOrServiceWorker<DomTypeHolder>;
Aliased Type§
enum WindowProxyOrMessagePortOrServiceWorker {
WindowProxy(Root<Dom<WindowProxy>>),
MessagePort(Root<Dom<MessagePort>>),
ServiceWorker(Root<Dom<ServiceWorker>>),
}
Variants§
WindowProxy(Root<Dom<WindowProxy>>)
MessagePort(Root<Dom<MessagePort>>)
ServiceWorker(Root<Dom<ServiceWorker>>)
Implementations
Source§impl<D: DomTypes> WindowProxyOrMessagePortOrServiceWorker<D>
impl<D: DomTypes> WindowProxyOrMessagePortOrServiceWorker<D>
unsafe fn TryConvertToWindowProxy( cx: SafeJSContext, value: HandleValue<'_>, ) -> Result<Option<DomRoot<D::WindowProxy>>, ()>
unsafe fn TryConvertToMessagePort( cx: SafeJSContext, value: HandleValue<'_>, ) -> Result<Option<DomRoot<D::MessagePort>>, ()>
unsafe fn TryConvertToServiceWorker( cx: SafeJSContext, value: HandleValue<'_>, ) -> Result<Option<DomRoot<D::ServiceWorker>>, ()>
Trait Implementations
Source§impl<D: DomTypes> FromJSValConvertible for WindowProxyOrMessagePortOrServiceWorker<D>
impl<D: DomTypes> FromJSValConvertible for WindowProxyOrMessagePortOrServiceWorker<D>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: HandleValue<'_>,
_option: (),
) -> Result<ConversionResult<WindowProxyOrMessagePortOrServiceWorker<D>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: HandleValue<'_>, _option: (), ) -> Result<ConversionResult<WindowProxyOrMessagePortOrServiceWorker<D>>, ()>
Convert
val
to type Self
.
Optional configuration of type T
can be passed as the option
argument.
If it returns Err(())
, a JSAPI exception is pending.
If it returns Ok(Failure(reason))
, there is no pending JSAPI exception.