pub struct Context<'a> { /* private fields */ }
Expand description

Equivalent to a new incognito window

Implementations§

Examples found in repository?
src/browser/mod.rs (line 277)
266
267
268
269
270
271
272
273
274
275
276
277
278
    pub fn new_context(&self) -> Result<context::Context> {
        debug!("Creating new browser context");
        let context_id = self
            .call_method(Target::CreateBrowserContext {
                dispose_on_detach: None,
                proxy_server: None,
                proxy_bypass_list: None,
                origins_with_universal_network_access: None,
            })?
            .browser_context_id;
        debug!("Created new browser context: {:?}", context_id);
        Ok(Context::new(self, context_id))
    }

Opens a new tab in this context. It will not share cookies or a cache with the default browsing context or any other contexts created

The BrowserContextId associated with this context

Any tabs created in this context

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Get the TypeId of this object.