pub struct EventListener<'a> { /* private fields */ }Expand description
Object event listener.
Implementations§
Source§impl<'a> EventListener<'a>
impl<'a> EventListener<'a>
Sourcepub fn builder(
type_: impl Into<Cow<'a, str>>,
use_capture: bool,
passive: bool,
once: bool,
script_id: ScriptId<'a>,
line_number: i64,
column_number: i64,
) -> EventListenerBuilder<'a>
pub fn builder( type_: impl Into<Cow<'a, str>>, use_capture: bool, passive: bool, once: bool, script_id: ScriptId<'a>, line_number: i64, column_number: i64, ) -> EventListenerBuilder<'a>
Creates a builder for this type with the required parameters:
type_:EventListener’s type.use_capture:EventListener’s useCapture.passive:EventListener’s passive flag.once:EventListener’s once flag.script_id: Script id of the handler code.line_number: Line number in the script (0-based).column_number: Column number in the script (0-based).
Sourcepub fn use_capture(&self) -> bool
pub fn use_capture(&self) -> bool
‘EventListener’’s useCapture.
Sourcepub fn line_number(&self) -> i64
pub fn line_number(&self) -> i64
Line number in the script (0-based).
Sourcepub fn column_number(&self) -> i64
pub fn column_number(&self) -> i64
Column number in the script (0-based).
Sourcepub fn handler(&self) -> Option<&RemoteObject>
pub fn handler(&self) -> Option<&RemoteObject>
Event handler function value.
Sourcepub fn original_handler(&self) -> Option<&RemoteObject>
pub fn original_handler(&self) -> Option<&RemoteObject>
Event original handler function value.
Sourcepub fn backend_node_id(&self) -> Option<&BackendNodeId>
pub fn backend_node_id(&self) -> Option<&BackendNodeId>
Node the listener is added to (if any).
Trait Implementations§
Source§impl<'a> Clone for EventListener<'a>
impl<'a> Clone for EventListener<'a>
Source§fn clone(&self) -> EventListener<'a>
fn clone(&self) -> EventListener<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for EventListener<'a>
impl<'a> Debug for EventListener<'a>
Source§impl<'a> Default for EventListener<'a>
impl<'a> Default for EventListener<'a>
Source§fn default() -> EventListener<'a>
fn default() -> EventListener<'a>
Returns the “default value” for a type. Read more
Source§impl<'de, 'a> Deserialize<'de> for EventListener<'a>
impl<'de, 'a> Deserialize<'de> for EventListener<'a>
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<'a> Freeze for EventListener<'a>
impl<'a> RefUnwindSafe for EventListener<'a>
impl<'a> Send for EventListener<'a>
impl<'a> Sync for EventListener<'a>
impl<'a> Unpin for EventListener<'a>
impl<'a> UnsafeUnpin for EventListener<'a>
impl<'a> UnwindSafe for EventListener<'a>
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