pub enum ElementCommand {
Find {
selector: String,
parent_id: Option<ElementId>,
},
FindAll {
selector: String,
parent_id: Option<ElementId>,
},
GetProperty {
element_id: ElementId,
name: String,
},
SetProperty {
element_id: ElementId,
name: String,
value: Value,
},
CallMethod {
element_id: ElementId,
name: String,
args: Vec<Value>,
},
Subscribe {
selector: String,
one_shot: bool,
},
Unsubscribe {
subscription_id: String,
},
WatchRemoval {
element_id: ElementId,
},
UnwatchRemoval {
element_id: ElementId,
},
WatchAttribute {
element_id: ElementId,
attribute_name: Option<String>,
},
UnwatchAttribute {
element_id: ElementId,
},
}Expand description
Element module commands for DOM interaction.
Variants§
Find
Find single element by CSS selector.
FindAll
Find all elements by CSS selector.
GetProperty
Get property via element[name].
SetProperty
Set property via element[name] = value.
CallMethod
Call method via element[name](...args).
Fields
Subscribe
Subscribe to element appearance.
Unsubscribe
Unsubscribe from element observation.
WatchRemoval
Watch for element removal.
UnwatchRemoval
Stop watching for element removal.
WatchAttribute
Watch for attribute changes.
Fields
UnwatchAttribute
Stop watching for attribute changes.
Trait Implementations§
Source§impl Clone for ElementCommand
impl Clone for ElementCommand
Source§fn clone(&self) -> ElementCommand
fn clone(&self) -> ElementCommand
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ElementCommand
impl Debug for ElementCommand
Source§impl<'de> Deserialize<'de> for ElementCommand
impl<'de> Deserialize<'de> for ElementCommand
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ElementCommand
impl RefUnwindSafe for ElementCommand
impl Send for ElementCommand
impl Sync for ElementCommand
impl Unpin for ElementCommand
impl UnwindSafe for ElementCommand
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