glendam/protocol/browser
This module is generated from the Chrome DevTools Protocol schema.
Do not edit this file manually. Generator: dev/codegen/generate_bindings.gleam Regenerate with:
gleam run -m codegen/generate_bindings
Protocol version: 1.3
Browser Domain
The Browser domain defines methods and events for browser managing.
📖 View this domain on the DevTools Protocol API Docs
Types
This type is not part of the protocol spec, it has been generated dynamically
to represent the response to the command get_version
pub type GetVersionResponse {
GetVersionResponse(
protocol_version: String,
product: String,
revision: String,
user_agent: String,
js_version: String,
)
}
Constructors
-
GetVersionResponse( protocol_version: String, product: String, revision: String, user_agent: String, js_version: String, )Represents the GetVersionResponse protocol value.
Arguments
- protocol_version
-
Protocol version.
- product
-
Product name.
- revision
-
Product revision.
- user_agent
-
User-Agent.
- js_version
-
V8 version.
Values
pub fn add_privacy_sandbox_enrollment_override(
callback callback__: fn(String, option.Option(json.Json)) -> Result(
dynamic.Dynamic,
chrome.RequestError,
),
url url: String,
) -> Result(dynamic.Dynamic, chrome.RequestError)
Allows a site to use privacy sandbox features that require enrollment without the site actually being enrolled. Only supported on page targets.
Parameters:
url
Returns:
pub fn close(
callback callback__: fn(String, option.Option(json.Json)) -> Result(
dynamic.Dynamic,
chrome.RequestError,
),
) -> Result(dynamic.Dynamic, chrome.RequestError)
Close browser gracefully.
pub fn get_version(
callback callback__: fn(String, option.Option(json.Json)) -> Result(
dynamic.Dynamic,
chrome.RequestError,
),
) -> Result(GetVersionResponse, chrome.RequestError)
Returns version information.
protocol_version: Protocol version.product: Product name.revision: Product revision.user_agent: User-Agent.js_version: V8 version.
pub fn reset_permissions(
callback callback__: fn(String, option.Option(json.Json)) -> Result(
dynamic.Dynamic,
chrome.RequestError,
),
browser_context_id browser_context_id: option.Option(String),
) -> Result(dynamic.Dynamic, chrome.RequestError)
Reset all permission management for all origins.
Parameters:
browser_context_id: BrowserContext to reset permissions. When omitted, default browser context is used.
Returns: