1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// @generated by scripts/generate-puppeteer-bindings.mjs from
// rust/protocol/puppeteer/api.json. Do not edit by hand.
#![allow(clippy::all, missing_docs, unused_imports, non_snake_case)]
use serde_json::Value;
use super::*;
use crate::puppeteer::bridge::{binary, remote_type, BridgeError, JsFunction, Remote};
impl Page {
/// `Page.resize`
///
/// ```text
/// resize(params: { contentWidth: number; contentHeight: number; }): Promise<void>
/// ```
pub async fn resize(&self, params: Value) -> Result<(), BridgeError> {
self.remote.call("resize", vec![Some(params)]).await
}
/// `Page.windowId`
///
/// ```text
/// windowId(): Promise<WindowId>
/// ```
pub async fn window_id(&self) -> Result<String, BridgeError> {
self.remote.call("windowId", vec![]).await
}
/// `Page.openDevTools`
///
/// ```text
/// openDevTools(): Promise<Page>
/// ```
pub async fn open_dev_tools(&self) -> Result<Page, BridgeError> {
self.remote.call("openDevTools", vec![]).await
}
/// `Page.hasDevTools`
///
/// ```text
/// hasDevTools(): Promise<boolean>
/// ```
pub async fn has_dev_tools(&self) -> Result<bool, BridgeError> {
self.remote.call("hasDevTools", vec![]).await
}
/// `Page.bluetooth`
///
/// ```text
/// get bluetooth(): BluetoothEmulation
/// ```
pub async fn bluetooth(&self) -> Result<BluetoothEmulation, BridgeError> {
self.remote.get("bluetooth").await
}
/// `Page.triggerExtensionAction`
///
/// ```text
/// triggerExtensionAction(extension: Extension): Promise<void>
/// ```
pub async fn trigger_extension_action(&self, extension: &Extension) -> Result<(), BridgeError> {
self.remote.call("triggerExtensionAction", vec![Some(extension.remote().to_wire())]).await
}
/// `Page.extensionRealms`
///
/// ```text
/// extensionRealms(): Realm[]
/// ```
pub async fn extension_realms(&self) -> Result<Vec<Realm>, BridgeError> {
self.remote.call("extensionRealms", vec![]).await
}
}