#[repr(C)]pub struct HTMLSlotElement {
htmlelement: HTMLElement,
assigned_nodes: RefCell<Vec<Slottable>>,
manually_assigned_nodes: RefCell<Vec<Slottable>>,
is_in_agents_signal_slots: Cell<bool>,
}
Expand description
Fields§
§htmlelement: HTMLElement
§assigned_nodes: RefCell<Vec<Slottable>>
§manually_assigned_nodes: RefCell<Vec<Slottable>>
§is_in_agents_signal_slots: Cell<bool>
Whether there is a queued signal change for this element
Necessary to avoid triggering too many slotchange events
Implementations§
Source§impl HTMLSlotElement
impl HTMLSlotElement
fn __assert_parent_type(&self)
Source§impl HTMLSlotElement
impl HTMLSlotElement
fn new_inherited( local_name: LocalName, prefix: Option<Prefix>, document: &Document, ) -> HTMLSlotElement
pub(crate) fn new( local_name: LocalName, prefix: Option<Prefix>, document: &Document, proto: Option<HandleObject<'_>>, can_gc: CanGc, ) -> DomRoot<HTMLSlotElement>
pub(crate) fn has_assigned_nodes(&self) -> bool
Sourcefn find_flattened_slottables(&self, result: &mut RootedVec<'_, Slottable>)
fn find_flattened_slottables(&self, result: &mut RootedVec<'_, Slottable>)
Sourcefn find_slottables(&self, result: &mut RootedVec<'_, Slottable>)
fn find_slottables(&self, result: &mut RootedVec<'_, Slottable>)
https://dom.spec.whatwg.org/#find-slotables
To avoid rooting shenanigans, this writes the returned slottables
into the result
argument
Sourcepub(crate) fn assign_slottables(&self)
pub(crate) fn assign_slottables(&self)
Sourcepub(crate) fn signal_a_slot_change(&self)
pub(crate) fn signal_a_slot_change(&self)
pub(crate) fn remove_from_signal_slots(&self)
Sourcepub(crate) fn assigned_nodes(&self) -> Ref<'_, [Slottable]>
pub(crate) fn assigned_nodes(&self) -> Ref<'_, [Slottable]>
Returns the slot’s assigned nodes if the root’s slot assignment mode is “named”, or the manually assigned nodes otherwise
Trait Implementations§
§impl Castable for HTMLSlotElement
impl Castable for HTMLSlotElement
Source§impl DomObject for HTMLSlotElement
impl DomObject for HTMLSlotElement
Source§impl DomObjectWrap<DomTypeHolder> for HTMLSlotElement
impl DomObjectWrap<DomTypeHolder> for HTMLSlotElement
Source§const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>, _: CanGc) -> Root<Dom<Self>> = {dom::bindings::codegen::GenericBindings::HTMLSlotElementBinding::HTMLSlotElement_Binding::Wrap::<dom::bindings::codegen::DomTypeHolder::DomTypeHolder> as for<'a, 'b> unsafe fn(script_bindings::script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::htmlslotelement::HTMLSlotElement>, script_bindings::script_runtime::CanGc) -> script_bindings::root::Root<script_bindings::root::Dom<dom::htmlslotelement::HTMLSlotElement>>}
const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>, _: CanGc) -> Root<Dom<Self>> = {dom::bindings::codegen::GenericBindings::HTMLSlotElementBinding::HTMLSlotElement_Binding::Wrap::<dom::bindings::codegen::DomTypeHolder::DomTypeHolder> as for<'a, 'b> unsafe fn(script_bindings::script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::htmlslotelement::HTMLSlotElement>, script_bindings::script_runtime::CanGc) -> script_bindings::root::Root<script_bindings::root::Dom<dom::htmlslotelement::HTMLSlotElement>>}
Function pointer to the general wrap function type
Source§impl HTMLSlotElementMethods<DomTypeHolder> for HTMLSlotElement
impl HTMLSlotElementMethods<DomTypeHolder> for HTMLSlotElement
Source§fn AssignedNodes(&self, options: &AssignedNodesOptions) -> Vec<DomRoot<Node>>
fn AssignedNodes(&self, options: &AssignedNodesOptions) -> Vec<DomRoot<Node>>
Source§fn AssignedElements(
&self,
options: &AssignedNodesOptions,
) -> Vec<DomRoot<Element>>
fn AssignedElements( &self, options: &AssignedNodesOptions, ) -> Vec<DomRoot<Element>>
Source§fn Assign(&self, nodes: Vec<ElementOrText<DomTypeHolder>>)
fn Assign(&self, nodes: Vec<ElementOrText<DomTypeHolder>>)
fn Name(&self) -> DOMString
fn SetName(&self, value: DOMString)
Source§impl HasParent for HTMLSlotElement
impl HasParent for HTMLSlotElement
Source§fn as_parent(&self) -> &HTMLElement
fn as_parent(&self) -> &HTMLElement
This is used in a type assertion to ensure that the source and webidls agree as to what the parent type is
type Parent = HTMLElement
Source§impl IDLInterface for HTMLSlotElement
impl IDLInterface for HTMLSlotElement
Source§impl MallocSizeOf for HTMLSlotElement
impl MallocSizeOf for HTMLSlotElement
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Source§impl MutDomObject for HTMLSlotElement
impl MutDomObject for HTMLSlotElement
Source§impl PartialEq for HTMLSlotElement
impl PartialEq for HTMLSlotElement
Source§impl ToJSValConvertible for HTMLSlotElement
impl ToJSValConvertible for HTMLSlotElement
Source§impl Traceable for HTMLSlotElement
impl Traceable for HTMLSlotElement
Source§impl VirtualMethods for HTMLSlotElement
impl VirtualMethods for HTMLSlotElement
Source§fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation<'_>)
fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation<'_>)
Source§fn super_type(&self) -> Option<&dyn VirtualMethods>
fn super_type(&self) -> Option<&dyn VirtualMethods>
Returns self as the superclass of the implementation for this trait,
if any.
Source§fn bind_to_tree(&self, context: &BindContext)
fn bind_to_tree(&self, context: &BindContext)
Called when a Node is appended to a tree, where ‘tree_connected’ indicates
whether the tree is part of a Document.
Source§fn unbind_from_tree(&self, context: &UnbindContext<'_>)
fn unbind_from_tree(&self, context: &UnbindContext<'_>)
Called when a Node is removed from a tree, where ‘tree_connected’
indicates whether the tree is part of a Document.
Implements removing steps:
https://dom.spec.whatwg.org/#concept-node-remove-ext
Source§fn attribute_affects_presentational_hints(&self, attr: &Attr) -> bool
fn attribute_affects_presentational_hints(&self, attr: &Attr) -> bool
Returns
true
if given attribute attr
affects style of the
given element.Source§fn parse_plain_attribute(&self, name: &LocalName, value: DOMString) -> AttrValue
fn parse_plain_attribute(&self, name: &LocalName, value: DOMString) -> AttrValue
Returns the right AttrValue variant for the attribute with name
name
on this element.Source§fn post_connection_steps(&self)
fn post_connection_steps(&self)
Invoked during a DOM tree mutation after a node becomes connected, once all
related DOM tree mutations have been applied.
https://dom.spec.whatwg.org/#concept-node-post-connection-ext
Source§fn children_changed(&self, mutation: &ChildrenMutation<'_>)
fn children_changed(&self, mutation: &ChildrenMutation<'_>)
Called on the parent when its children are changed.
Source§fn handle_event(&self, event: &Event)
fn handle_event(&self, event: &Event)
Called during event dispatch after the bubbling phase completes.
Source§fn adopting_steps(&self, old_doc: &Document)
fn adopting_steps(&self, old_doc: &Document)
Source§fn cloning_steps(
&self,
copy: &Node,
maybe_doc: Option<&Document>,
clone_children: CloneChildrenFlag,
)
fn cloning_steps( &self, copy: &Node, maybe_doc: Option<&Document>, clone_children: CloneChildrenFlag, )
impl DerivedFrom<Element> for HTMLSlotElement
impl DerivedFrom<EventTarget> for HTMLSlotElement
impl DerivedFrom<HTMLElement> for HTMLSlotElement
impl DerivedFrom<Node> for HTMLSlotElement
impl Eq for HTMLSlotElement
Auto Trait Implementations§
impl !Freeze for HTMLSlotElement
impl !RefUnwindSafe for HTMLSlotElement
impl !Send for HTMLSlotElement
impl !Sync for HTMLSlotElement
impl Unpin for HTMLSlotElement
impl !UnwindSafe for HTMLSlotElement
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert