pub(crate) type MessageEventSource = MessageEventSource<DomTypeHolder>;
Aliased Type§
enum MessageEventSource {
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>>)
Trait Implementations
Source§impl<D> FromJSValConvertible for WindowProxyOrMessagePortOrServiceWorker<D>where
D: DomTypes,
impl<D> FromJSValConvertible for WindowProxyOrMessagePortOrServiceWorker<D>where
D: DomTypes,
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: Handle<'_, Value>,
_option: (),
) -> Result<ConversionResult<WindowProxyOrMessagePortOrServiceWorker<D>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: Handle<'_, Value>, _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.