pub(crate) type HTMLOptionElementOrHTMLOptGroupElement = HTMLOptionElementOrHTMLOptGroupElement<DomTypeHolder>;
Aliased Type§
enum HTMLOptionElementOrHTMLOptGroupElement {
HTMLOptionElement(Root<Dom<HTMLOptionElement>>),
HTMLOptGroupElement(Root<Dom<HTMLOptGroupElement>>),
}
Variants§
HTMLOptionElement(Root<Dom<HTMLOptionElement>>)
HTMLOptGroupElement(Root<Dom<HTMLOptGroupElement>>)
Implementations
Source§impl<D: DomTypes> HTMLOptionElementOrHTMLOptGroupElement<D>
impl<D: DomTypes> HTMLOptionElementOrHTMLOptGroupElement<D>
unsafe fn TryConvertToHTMLOptionElement( cx: SafeJSContext, value: HandleValue<'_>, ) -> Result<Option<DomRoot<D::HTMLOptionElement>>, ()>
unsafe fn TryConvertToHTMLOptGroupElement( cx: SafeJSContext, value: HandleValue<'_>, ) -> Result<Option<DomRoot<D::HTMLOptGroupElement>>, ()>
Trait Implementations
Source§impl<D: DomTypes> FromJSValConvertible for HTMLOptionElementOrHTMLOptGroupElement<D>
impl<D: DomTypes> FromJSValConvertible for HTMLOptionElementOrHTMLOptGroupElement<D>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: HandleValue<'_>,
_option: (),
) -> Result<ConversionResult<HTMLOptionElementOrHTMLOptGroupElement<D>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: HandleValue<'_>, _option: (), ) -> Result<ConversionResult<HTMLOptionElementOrHTMLOptGroupElement<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.