pub(crate) trait DOMTokenListMethods<D>where
D: DomTypes,{
// Required methods
fn Length(&self) -> u32;
fn Item(&self, index: u32) -> Option<DOMString>;
fn Contains(&self, token: DOMString) -> bool;
fn Add(
&self,
cx: &mut JSContext,
tokens: Vec<DOMString>,
) -> Result<(), Error>;
fn Remove(
&self,
cx: &mut JSContext,
tokens: Vec<DOMString>,
) -> Result<(), Error>;
fn Toggle(
&self,
cx: &mut JSContext,
token: DOMString,
force: Option<bool>,
) -> Result<bool, Error>;
fn Replace(
&self,
cx: &mut JSContext,
token: DOMString,
newToken: DOMString,
) -> Result<bool, Error>;
fn Supports(&self, token: DOMString) -> Result<bool, Error>;
fn Value(&self) -> DOMString;
fn SetValue(&self, cx: &mut JSContext, value: DOMString);
fn IndexedGetter(&self, index: u32) -> Option<DOMString>;
}Required Methods§
fn Length(&self) -> u32
fn Item(&self, index: u32) -> Option<DOMString>
fn Contains(&self, token: DOMString) -> bool
fn Add(&self, cx: &mut JSContext, tokens: Vec<DOMString>) -> Result<(), Error>
fn Remove( &self, cx: &mut JSContext, tokens: Vec<DOMString>, ) -> Result<(), Error>
fn Toggle( &self, cx: &mut JSContext, token: DOMString, force: Option<bool>, ) -> Result<bool, Error>
fn Replace( &self, cx: &mut JSContext, token: DOMString, newToken: DOMString, ) -> Result<bool, Error>
fn Supports(&self, token: DOMString) -> Result<bool, Error>
fn Value(&self) -> DOMString
fn SetValue(&self, cx: &mut JSContext, value: DOMString)
fn IndexedGetter(&self, index: u32) -> Option<DOMString>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".