pub struct CreateTargetParamsBuilder<'a> { /* private fields */ }Implementations§
Source§impl<'a> CreateTargetParamsBuilder<'a>
impl<'a> CreateTargetParamsBuilder<'a>
Sourcepub fn left(self, left: i64) -> Self
pub fn left(self, left: i64) -> Self
Frame left origin in DIP (requires newWindow to be true or headless shell).
Sourcepub fn top(self, top: i64) -> Self
pub fn top(self, top: i64) -> Self
Frame top origin in DIP (requires newWindow to be true or headless shell).
Sourcepub fn width(self, width: u64) -> Self
pub fn width(self, width: u64) -> Self
Frame width in DIP (requires newWindow to be true or headless shell).
Sourcepub fn height(self, height: i64) -> Self
pub fn height(self, height: i64) -> Self
Frame height in DIP (requires newWindow to be true or headless shell).
Sourcepub fn windowState(self, windowState: WindowState) -> Self
pub fn windowState(self, windowState: WindowState) -> Self
Frame window state (requires newWindow to be true or headless shell). Default is normal.
Sourcepub fn browserContextId(self, browserContextId: BrowserContextID<'a>) -> Self
pub fn browserContextId(self, browserContextId: BrowserContextID<'a>) -> Self
The browser context to create the page in.
Sourcepub fn enableBeginFrameControl(self, enableBeginFrameControl: bool) -> Self
pub fn enableBeginFrameControl(self, enableBeginFrameControl: bool) -> Self
Whether BeginFrames for this target will be controlled via DevTools (headless shell only, not supported on MacOS yet, false by default).
Sourcepub fn newWindow(self, newWindow: bool) -> Self
pub fn newWindow(self, newWindow: bool) -> Self
Whether to create a new Window or Tab (false by default, not supported by headless shell).
Sourcepub fn background(self, background: bool) -> Self
pub fn background(self, background: bool) -> Self
Whether to create the target in background or foreground (false by default, not supported by headless shell).
Whether to create a hidden target. The hidden target is observable via protocol, but not present in the tab UI strip. Cannot be created with ‘forTab: true’, ‘newWindow: true’ or ‘background: false’. The life-time of the tab is limited to the life-time of the session.
Sourcepub fn focus(self, focus: bool) -> Self
pub fn focus(self, focus: bool) -> Self
If specified, the option is used to determine if the new target should be focused or not. By default, the focus behavior depends on the value of the background field. For example, background=false and focus=false will result in the target tab being opened but the browser window remain unchanged (if it was in the background, it will remain in the background) and background=false with focus=undefined will result in the window being focused. Using background: true and focus: true is not supported and will result in an error.