Skip to main content

DOMRegistration

Struct DOMRegistration 

Source
pub struct DOMRegistration { /* private fields */ }
Expand description

Event registration interface for DOM domain.

Implementations§

Source§

impl DOMRegistration

Source

pub fn attribute_modified<F, Fut>(&self, callback: F)
where F: Fn(AttributeModifiedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when Element’s attribute is modified.

Source

pub fn adopted_style_sheets_modified<F, Fut>(&self, callback: F)
where F: Fn(AdoptedStyleSheetsModifiedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when Element’s adoptedStyleSheets are modified.

Source

pub fn attribute_removed<F, Fut>(&self, callback: F)
where F: Fn(AttributeRemovedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when Element’s attribute is removed.

Source

pub fn character_data_modified<F, Fut>(&self, callback: F)
where F: Fn(CharacterDataModifiedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Mirrors DOMCharacterDataModified event.

Source

pub fn child_node_count_updated<F, Fut>(&self, callback: F)
where F: Fn(ChildNodeCountUpdatedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when Container’s child node count has changed.

Source

pub fn child_node_inserted<F, Fut>(&self, callback: F)
where F: Fn(ChildNodeInsertedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Mirrors DOMNodeInserted event.

Source

pub fn child_node_removed<F, Fut>(&self, callback: F)
where F: Fn(ChildNodeRemovedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Mirrors DOMNodeRemoved event.

Source

pub fn distributed_nodes_updated<F, Fut>(&self, callback: F)
where F: Fn(DistributedNodesUpdatedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Called when distribution is changed.

Source

pub fn document_updated<F, Fut>(&self, callback: F)
where F: Fn(DocumentUpdatedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when Document has been totally updated. Node ids are no longer valid.

Source

pub fn inline_style_invalidated<F, Fut>(&self, callback: F)
where F: Fn(InlineStyleInvalidatedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when Element’s inline style is modified via a CSS property modification.

Source

pub fn pseudo_element_added<F, Fut>(&self, callback: F)
where F: Fn(PseudoElementAddedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Called when a pseudo element is added to an element.

Source

pub fn top_layer_elements_updated<F, Fut>(&self, callback: F)
where F: Fn(TopLayerElementsUpdatedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Called when top layer elements are changed.

Source

pub fn scrollable_flag_updated<F, Fut>(&self, callback: F)
where F: Fn(ScrollableFlagUpdatedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when a node’s scrollability state changes.

Source

pub fn affected_by_starting_styles_flag_updated<F, Fut>(&self, callback: F)
where F: Fn(AffectedByStartingStylesFlagUpdatedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when a node’s starting styles changes.

Source

pub fn pseudo_element_removed<F, Fut>(&self, callback: F)
where F: Fn(PseudoElementRemovedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Called when a pseudo element is removed from an element.

Source

pub fn set_child_nodes<F, Fut>(&self, callback: F)
where F: Fn(SetChildNodesEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids.

Source

pub fn shadow_root_popped<F, Fut>(&self, callback: F)
where F: Fn(ShadowRootPoppedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Called when shadow root is popped from the element.

Source

pub fn shadow_root_pushed<F, Fut>(&self, callback: F)
where F: Fn(ShadowRootPushedEvent, Option<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Called when shadow root is pushed into the element.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more