pub struct AddBindingParams<'a> { /* private fields */ }Expand description
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§
Source§impl<'a> AddBindingParams<'a>
impl<'a> AddBindingParams<'a>
Sourcepub fn builder(name: impl Into<Cow<'a, str>>) -> AddBindingParamsBuilder<'a>
pub fn builder(name: impl Into<Cow<'a, str>>) -> AddBindingParamsBuilder<'a>
Creates a builder for this type with the required parameters:
name:
pub fn name(&self) -> &str
Sourcepub fn execution_context_id(&self) -> Option<&ExecutionContextId>
pub fn execution_context_id(&self) -> Option<&ExecutionContextId>
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’. Deprecated in favor of ‘executionContextName’ due to an unclear use case and bugs in implementation (crbug.com/1169639). ‘executionContextId’ will be removed in the future.
Sourcepub fn execution_context_name(&self) -> Option<&str>
pub fn execution_context_name(&self) -> Option<&str>
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§
Source§impl<'a> CdpCommand<'a> for AddBindingParams<'a>
impl<'a> CdpCommand<'a> for AddBindingParams<'a>
Source§impl<'a> Clone for AddBindingParams<'a>
impl<'a> Clone for AddBindingParams<'a>
Source§fn clone(&self) -> AddBindingParams<'a>
fn clone(&self) -> AddBindingParams<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more