pub(crate) trait DocumentFragmentMethods<D: DomTypes> {
// Required methods
fn GetElementById(
&self,
elementId: DOMString,
) -> Option<DomRoot<D::Element>>;
fn Children(&self) -> DomRoot<D::HTMLCollection>;
fn GetFirstElementChild(&self) -> Option<DomRoot<D::Element>>;
fn GetLastElementChild(&self) -> Option<DomRoot<D::Element>>;
fn ChildElementCount(&self) -> u32;
fn Prepend(
&self,
nodes: Vec<NodeOrString<D>>,
_can_gc: CanGc,
) -> Fallible<()>;
fn Append(
&self,
nodes: Vec<NodeOrString<D>>,
_can_gc: CanGc,
) -> Fallible<()>;
fn ReplaceChildren(
&self,
nodes: Vec<NodeOrString<D>>,
_can_gc: CanGc,
) -> Fallible<()>;
fn QuerySelector(
&self,
selectors: DOMString,
) -> Fallible<Option<DomRoot<D::Element>>>;
fn QuerySelectorAll(
&self,
selectors: DOMString,
) -> Fallible<DomRoot<D::NodeList>>;
fn Constructor(
global: &D::Window,
proto: Option<HandleObject<'_>>,
can_gc: CanGc,
) -> Fallible<DomRoot<D::DocumentFragment>>;
}
Required Methods§
fn GetElementById(&self, elementId: DOMString) -> Option<DomRoot<D::Element>>
fn Children(&self) -> DomRoot<D::HTMLCollection>
fn GetFirstElementChild(&self) -> Option<DomRoot<D::Element>>
fn GetLastElementChild(&self) -> Option<DomRoot<D::Element>>
fn ChildElementCount(&self) -> u32
fn Prepend(&self, nodes: Vec<NodeOrString<D>>, _can_gc: CanGc) -> Fallible<()>
fn Append(&self, nodes: Vec<NodeOrString<D>>, _can_gc: CanGc) -> Fallible<()>
fn ReplaceChildren( &self, nodes: Vec<NodeOrString<D>>, _can_gc: CanGc, ) -> Fallible<()>
fn QuerySelector( &self, selectors: DOMString, ) -> Fallible<Option<DomRoot<D::Element>>>
fn QuerySelectorAll( &self, selectors: DOMString, ) -> Fallible<DomRoot<D::NodeList>>
fn Constructor( global: &D::Window, proto: Option<HandleObject<'_>>, can_gc: CanGc, ) -> Fallible<DomRoot<D::DocumentFragment>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.