pub trait HTMLOptionsCollectionMethods<D>where
D: DomTypes,{
// Required methods
fn Length(&self, cx: &JSContext) -> u32;
fn SetLength(&self, cx: &mut JSContext, value: u32);
fn Add(
&self,
cx: &mut JSContext,
element: HTMLOptionElementOrHTMLOptGroupElement<D>,
before: Option<HTMLElementOrLong<D>>,
) -> Result<(), Error>;
fn Remove(&self, cx: &mut JSContext, index: i32);
fn SelectedIndex(&self, cx: &JSContext) -> i32;
fn SetSelectedIndex(&self, cx: &mut JSContext, value: i32);
fn IndexedGetter(
&self,
cx: &JSContext,
index: u32,
) -> Option<Root<Dom<<D as DomTypes>::Element>>>;
fn IndexedSetter(
&self,
cx: &mut JSContext,
index: u32,
option: Option<&<D as DomTypes>::HTMLOptionElement>,
) -> Result<(), Error>;
fn SupportedPropertyNames(&self, no_gc: &NoGC) -> Vec<DOMString>;
fn NamedGetter(
&self,
cx: &JSContext,
name: DOMString,
) -> Option<Root<Dom<<D as DomTypes>::Element>>>;
}Required Methods§
fn Length(&self, cx: &JSContext) -> u32
fn SetLength(&self, cx: &mut JSContext, value: u32)
fn Add( &self, cx: &mut JSContext, element: HTMLOptionElementOrHTMLOptGroupElement<D>, before: Option<HTMLElementOrLong<D>>, ) -> Result<(), Error>
fn Remove(&self, cx: &mut JSContext, index: i32)
fn SelectedIndex(&self, cx: &JSContext) -> i32
fn SetSelectedIndex(&self, cx: &mut JSContext, value: i32)
fn IndexedGetter( &self, cx: &JSContext, index: u32, ) -> Option<Root<Dom<<D as DomTypes>::Element>>>
fn IndexedSetter( &self, cx: &mut JSContext, index: u32, option: Option<&<D as DomTypes>::HTMLOptionElement>, ) -> Result<(), Error>
fn SupportedPropertyNames(&self, no_gc: &NoGC) -> Vec<DOMString>
fn NamedGetter( &self, cx: &JSContext, name: DOMString, ) -> Option<Root<Dom<<D as DomTypes>::Element>>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".