Struct chrome_remote_interface_model::runtime::AddBindingCommand[][src]

pub struct AddBindingCommand { /* fields omitted */ }
This is supported on crate features Runtime and experimental only.

If executionContextId is empty, adds binding with the given name on the global objects of all inspected contexts, including those created later, bindings survive reloads. Binding function takes exactly one argument, this argument should be string, in case of any other input, function throws an exception. Each binding function call produces Runtime.bindingCalled notification.

Implementations

impl AddBindingCommand[src]

pub fn new(
    name: String,
    execution_context_id: Option<ExecutionContextId>,
    execution_context_name: Option<String>
) -> Self
[src]

pub fn name(&self) -> &str[src]

pub fn execution_context_id(&self) -> Option<&ExecutionContextId>[src]

If specified, the binding would only be exposed to the specified execution context. If omitted and executionContextName is not set, the binding is exposed to all execution contexts of the target. This parameter is mutually exclusive with executionContextName.

pub fn execution_context_name(&self) -> Option<&String>[src]

If specified, the binding is exposed to the executionContext with matching name, even for contexts created after the binding is added. See also ExecutionContext.name and worldName parameter to Page.addScriptToEvaluateOnNewDocument. This parameter is mutually exclusive with executionContextId.

Trait Implementations

impl Clone for AddBindingCommand[src]

impl Command for AddBindingCommand[src]

type Return = AddBindingReturn

Return type.

impl Debug for AddBindingCommand[src]

impl<'de> Deserialize<'de> for AddBindingCommand[src]

impl Serialize for AddBindingCommand[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.