cdproto: github.com/chromedp/cdproto/emulation Index | Files

package emulation

import "github.com/chromedp/cdproto/emulation"

Package emulation provides the Chrome DevTools Protocol commands, types, and events for the Emulation domain.

This domain emulates different environments for the page.

Generated by the cdproto-gen command.

Index

Package Files

easyjson.go emulation.go events.go types.go

Constants

const (
    CommandCanEmulate                        = "Emulation.canEmulate"
    CommandClearDeviceMetricsOverride        = "Emulation.clearDeviceMetricsOverride"
    CommandClearGeolocationOverride          = "Emulation.clearGeolocationOverride"
    CommandResetPageScaleFactor              = "Emulation.resetPageScaleFactor"
    CommandSetFocusEmulationEnabled          = "Emulation.setFocusEmulationEnabled"
    CommandSetCPUThrottlingRate              = "Emulation.setCPUThrottlingRate"
    CommandSetDefaultBackgroundColorOverride = "Emulation.setDefaultBackgroundColorOverride"
    CommandSetDeviceMetricsOverride          = "Emulation.setDeviceMetricsOverride"
    CommandSetScrollbarsHidden               = "Emulation.setScrollbarsHidden"
    CommandSetDocumentCookieDisabled         = "Emulation.setDocumentCookieDisabled"
    CommandSetEmitTouchEventsForMouse        = "Emulation.setEmitTouchEventsForMouse"
    CommandSetEmulatedMedia                  = "Emulation.setEmulatedMedia"
    CommandSetEmulatedVisionDeficiency       = "Emulation.setEmulatedVisionDeficiency"
    CommandSetGeolocationOverride            = "Emulation.setGeolocationOverride"
    CommandSetPageScaleFactor                = "Emulation.setPageScaleFactor"
    CommandSetScriptExecutionDisabled        = "Emulation.setScriptExecutionDisabled"
    CommandSetTouchEmulationEnabled          = "Emulation.setTouchEmulationEnabled"
    CommandSetVirtualTimePolicy              = "Emulation.setVirtualTimePolicy"
    CommandSetLocaleOverride                 = "Emulation.setLocaleOverride"
    CommandSetTimezoneOverride               = "Emulation.setTimezoneOverride"
    CommandSetUserAgentOverride              = "Emulation.setUserAgentOverride"
)

Command names.

type CanEmulateParams Uses

type CanEmulateParams struct{}

CanEmulateParams tells whether emulation is supported.

func CanEmulate Uses

func CanEmulate() *CanEmulateParams

CanEmulate tells whether emulation is supported.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-canEmulate

func (*CanEmulateParams) Do Uses

func (p *CanEmulateParams) Do(ctx context.Context) (result bool, err error)

Do executes Emulation.canEmulate against the provided context.

returns:

result - True if emulation is supported.

func (CanEmulateParams) MarshalEasyJSON Uses

func (v CanEmulateParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (CanEmulateParams) MarshalJSON Uses

func (v CanEmulateParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*CanEmulateParams) UnmarshalEasyJSON Uses

func (v *CanEmulateParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*CanEmulateParams) UnmarshalJSON Uses

func (v *CanEmulateParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type CanEmulateReturns Uses

type CanEmulateReturns struct {
    Result bool `json:"result,omitempty"` // True if emulation is supported.
}

CanEmulateReturns return values.

func (CanEmulateReturns) MarshalEasyJSON Uses

func (v CanEmulateReturns) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (CanEmulateReturns) MarshalJSON Uses

func (v CanEmulateReturns) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*CanEmulateReturns) UnmarshalEasyJSON Uses

func (v *CanEmulateReturns) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*CanEmulateReturns) UnmarshalJSON Uses

func (v *CanEmulateReturns) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ClearDeviceMetricsOverrideParams Uses

type ClearDeviceMetricsOverrideParams struct{}

ClearDeviceMetricsOverrideParams clears the overridden device metrics.

func ClearDeviceMetricsOverride Uses

func ClearDeviceMetricsOverride() *ClearDeviceMetricsOverrideParams

ClearDeviceMetricsOverride clears the overridden device metrics.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-clearDeviceMetricsOverride

func (*ClearDeviceMetricsOverrideParams) Do Uses

func (p *ClearDeviceMetricsOverrideParams) Do(ctx context.Context) (err error)

Do executes Emulation.clearDeviceMetricsOverride against the provided context.

func (ClearDeviceMetricsOverrideParams) MarshalEasyJSON Uses

func (v ClearDeviceMetricsOverrideParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ClearDeviceMetricsOverrideParams) MarshalJSON Uses

func (v ClearDeviceMetricsOverrideParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ClearDeviceMetricsOverrideParams) UnmarshalEasyJSON Uses

func (v *ClearDeviceMetricsOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ClearDeviceMetricsOverrideParams) UnmarshalJSON Uses

func (v *ClearDeviceMetricsOverrideParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ClearGeolocationOverrideParams Uses

type ClearGeolocationOverrideParams struct{}

ClearGeolocationOverrideParams clears the overridden Geolocation Position and Error.

func ClearGeolocationOverride Uses

func ClearGeolocationOverride() *ClearGeolocationOverrideParams

ClearGeolocationOverride clears the overridden Geolocation Position and Error.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-clearGeolocationOverride

func (*ClearGeolocationOverrideParams) Do Uses

func (p *ClearGeolocationOverrideParams) Do(ctx context.Context) (err error)

Do executes Emulation.clearGeolocationOverride against the provided context.

func (ClearGeolocationOverrideParams) MarshalEasyJSON Uses

func (v ClearGeolocationOverrideParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ClearGeolocationOverrideParams) MarshalJSON Uses

func (v ClearGeolocationOverrideParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ClearGeolocationOverrideParams) UnmarshalEasyJSON Uses

func (v *ClearGeolocationOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ClearGeolocationOverrideParams) UnmarshalJSON Uses

func (v *ClearGeolocationOverrideParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EventVirtualTimeBudgetExpired Uses

type EventVirtualTimeBudgetExpired struct{}

EventVirtualTimeBudgetExpired notification sent after the virtual time budget for the current VirtualTimePolicy has run out.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#event-virtualTimeBudgetExpired

func (EventVirtualTimeBudgetExpired) MarshalEasyJSON Uses

func (v EventVirtualTimeBudgetExpired) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventVirtualTimeBudgetExpired) MarshalJSON Uses

func (v EventVirtualTimeBudgetExpired) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventVirtualTimeBudgetExpired) UnmarshalEasyJSON Uses

func (v *EventVirtualTimeBudgetExpired) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventVirtualTimeBudgetExpired) UnmarshalJSON Uses

func (v *EventVirtualTimeBudgetExpired) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type MediaFeature Uses

type MediaFeature struct {
    Name  string `json:"name"`
    Value string `json:"value"`
}

MediaFeature [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#type-MediaFeature

func (MediaFeature) MarshalEasyJSON Uses

func (v MediaFeature) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (MediaFeature) MarshalJSON Uses

func (v MediaFeature) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*MediaFeature) UnmarshalEasyJSON Uses

func (v *MediaFeature) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*MediaFeature) UnmarshalJSON Uses

func (v *MediaFeature) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type OrientationType Uses

type OrientationType string

OrientationType orientation type.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#type-ScreenOrientation

const (
    OrientationTypePortraitPrimary    OrientationType = "portraitPrimary"
    OrientationTypePortraitSecondary  OrientationType = "portraitSecondary"
    OrientationTypeLandscapePrimary   OrientationType = "landscapePrimary"
    OrientationTypeLandscapeSecondary OrientationType = "landscapeSecondary"
)

OrientationType values.

func (OrientationType) MarshalEasyJSON Uses

func (t OrientationType) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (OrientationType) MarshalJSON Uses

func (t OrientationType) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (OrientationType) String Uses

func (t OrientationType) String() string

String returns the OrientationType as string value.

func (*OrientationType) UnmarshalEasyJSON Uses

func (t *OrientationType) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*OrientationType) UnmarshalJSON Uses

func (t *OrientationType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type ResetPageScaleFactorParams Uses

type ResetPageScaleFactorParams struct{}

ResetPageScaleFactorParams requests that page scale factor is reset to initial values.

func ResetPageScaleFactor Uses

func ResetPageScaleFactor() *ResetPageScaleFactorParams

ResetPageScaleFactor requests that page scale factor is reset to initial values.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-resetPageScaleFactor

func (*ResetPageScaleFactorParams) Do Uses

func (p *ResetPageScaleFactorParams) Do(ctx context.Context) (err error)

Do executes Emulation.resetPageScaleFactor against the provided context.

func (ResetPageScaleFactorParams) MarshalEasyJSON Uses

func (v ResetPageScaleFactorParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ResetPageScaleFactorParams) MarshalJSON Uses

func (v ResetPageScaleFactorParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ResetPageScaleFactorParams) UnmarshalEasyJSON Uses

func (v *ResetPageScaleFactorParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ResetPageScaleFactorParams) UnmarshalJSON Uses

func (v *ResetPageScaleFactorParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ScreenOrientation Uses

type ScreenOrientation struct {
    Type  OrientationType `json:"type"`  // Orientation type.
    Angle int64           `json:"angle"` // Orientation angle.
}

ScreenOrientation screen orientation.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#type-ScreenOrientation

func (ScreenOrientation) MarshalEasyJSON Uses

func (v ScreenOrientation) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ScreenOrientation) MarshalJSON Uses

func (v ScreenOrientation) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ScreenOrientation) UnmarshalEasyJSON Uses

func (v *ScreenOrientation) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ScreenOrientation) UnmarshalJSON Uses

func (v *ScreenOrientation) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type SetCPUThrottlingRateParams Uses

type SetCPUThrottlingRateParams struct {
    Rate float64 `json:"rate"` // Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).
}

SetCPUThrottlingRateParams enables CPU throttling to emulate slow CPUs.

func SetCPUThrottlingRate Uses

func SetCPUThrottlingRate(rate float64) *SetCPUThrottlingRateParams

SetCPUThrottlingRate enables CPU throttling to emulate slow CPUs.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setCPUThrottlingRate

parameters:

rate - Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).

func (*SetCPUThrottlingRateParams) Do Uses

func (p *SetCPUThrottlingRateParams) Do(ctx context.Context) (err error)

Do executes Emulation.setCPUThrottlingRate against the provided context.

func (SetCPUThrottlingRateParams) MarshalEasyJSON Uses

func (v SetCPUThrottlingRateParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetCPUThrottlingRateParams) MarshalJSON Uses

func (v SetCPUThrottlingRateParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetCPUThrottlingRateParams) UnmarshalEasyJSON Uses

func (v *SetCPUThrottlingRateParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetCPUThrottlingRateParams) UnmarshalJSON Uses

func (v *SetCPUThrottlingRateParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type SetDefaultBackgroundColorOverrideParams Uses

type SetDefaultBackgroundColorOverrideParams struct {
    Color *cdp.RGBA `json:"color,omitempty"` // RGBA of the default background color. If not specified, any existing override will be cleared.
}

SetDefaultBackgroundColorOverrideParams sets or clears an override of the default background color of the frame. This override is used if the content does not specify one.

func SetDefaultBackgroundColorOverride Uses

func SetDefaultBackgroundColorOverride() *SetDefaultBackgroundColorOverrideParams

SetDefaultBackgroundColorOverride sets or clears an override of the default background color of the frame. This override is used if the content does not specify one.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setDefaultBackgroundColorOverride

parameters:

func (*SetDefaultBackgroundColorOverrideParams) Do Uses

func (p *SetDefaultBackgroundColorOverrideParams) Do(ctx context.Context) (err error)

Do executes Emulation.setDefaultBackgroundColorOverride against the provided context.

func (SetDefaultBackgroundColorOverrideParams) MarshalEasyJSON Uses

func (v SetDefaultBackgroundColorOverrideParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetDefaultBackgroundColorOverrideParams) MarshalJSON Uses

func (v SetDefaultBackgroundColorOverrideParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetDefaultBackgroundColorOverrideParams) UnmarshalEasyJSON Uses

func (v *SetDefaultBackgroundColorOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetDefaultBackgroundColorOverrideParams) UnmarshalJSON Uses

func (v *SetDefaultBackgroundColorOverrideParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (SetDefaultBackgroundColorOverrideParams) WithColor Uses

func (p SetDefaultBackgroundColorOverrideParams) WithColor(color *cdp.RGBA) *SetDefaultBackgroundColorOverrideParams

WithColor rGBA of the default background color. If not specified, any existing override will be cleared.

type SetDeviceMetricsOverrideParams Uses

type SetDeviceMetricsOverrideParams struct {
    Width              int64              `json:"width"`                        // Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
    Height             int64              `json:"height"`                       // Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
    DeviceScaleFactor  float64            `json:"deviceScaleFactor"`            // Overriding device scale factor value. 0 disables the override.
    Mobile             bool               `json:"mobile"`                       // Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.
    Scale              float64            `json:"scale,omitempty"`              // Scale to apply to resulting view image.
    ScreenWidth        int64              `json:"screenWidth,omitempty"`        // Overriding screen width value in pixels (minimum 0, maximum 10000000).
    ScreenHeight       int64              `json:"screenHeight,omitempty"`       // Overriding screen height value in pixels (minimum 0, maximum 10000000).
    PositionX          int64              `json:"positionX,omitempty"`          // Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
    PositionY          int64              `json:"positionY,omitempty"`          // Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
    DontSetVisibleSize bool               `json:"dontSetVisibleSize,omitempty"` // Do not set visible view size, rely upon explicit setVisibleSize call.
    ScreenOrientation  *ScreenOrientation `json:"screenOrientation,omitempty"`  // Screen orientation override.
    Viewport           *page.Viewport     `json:"viewport,omitempty"`           // If set, the visible area of the page will be overridden to this viewport. This viewport change is not observed by the page, e.g. viewport-relative elements do not change positions.
}

SetDeviceMetricsOverrideParams overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results).

func SetDeviceMetricsOverride Uses

func SetDeviceMetricsOverride(width int64, height int64, deviceScaleFactor float64, mobile bool) *SetDeviceMetricsOverrideParams

SetDeviceMetricsOverride overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results).

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setDeviceMetricsOverride

parameters:

width - Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
height - Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
deviceScaleFactor - Overriding device scale factor value. 0 disables the override.
mobile - Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.

func (*SetDeviceMetricsOverrideParams) Do Uses

func (p *SetDeviceMetricsOverrideParams) Do(ctx context.Context) (err error)

Do executes Emulation.setDeviceMetricsOverride against the provided context.

func (SetDeviceMetricsOverrideParams) MarshalEasyJSON Uses

func (v SetDeviceMetricsOverrideParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetDeviceMetricsOverrideParams) MarshalJSON Uses

func (v SetDeviceMetricsOverrideParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetDeviceMetricsOverrideParams) UnmarshalEasyJSON Uses

func (v *SetDeviceMetricsOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetDeviceMetricsOverrideParams) UnmarshalJSON Uses

func (v *SetDeviceMetricsOverrideParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (SetDeviceMetricsOverrideParams) WithDontSetVisibleSize Uses

func (p SetDeviceMetricsOverrideParams) WithDontSetVisibleSize(dontSetVisibleSize bool) *SetDeviceMetricsOverrideParams

WithDontSetVisibleSize do not set visible view size, rely upon explicit setVisibleSize call.

func (SetDeviceMetricsOverrideParams) WithPositionX Uses

func (p SetDeviceMetricsOverrideParams) WithPositionX(positionX int64) *SetDeviceMetricsOverrideParams

WithPositionX overriding view X position on screen in pixels (minimum 0, maximum 10000000).

func (SetDeviceMetricsOverrideParams) WithPositionY Uses

func (p SetDeviceMetricsOverrideParams) WithPositionY(positionY int64) *SetDeviceMetricsOverrideParams

WithPositionY overriding view Y position on screen in pixels (minimum 0, maximum 10000000).

func (SetDeviceMetricsOverrideParams) WithScale Uses

func (p SetDeviceMetricsOverrideParams) WithScale(scale float64) *SetDeviceMetricsOverrideParams

WithScale scale to apply to resulting view image.

func (SetDeviceMetricsOverrideParams) WithScreenHeight Uses

func (p SetDeviceMetricsOverrideParams) WithScreenHeight(screenHeight int64) *SetDeviceMetricsOverrideParams

WithScreenHeight overriding screen height value in pixels (minimum 0, maximum 10000000).

func (SetDeviceMetricsOverrideParams) WithScreenOrientation Uses

func (p SetDeviceMetricsOverrideParams) WithScreenOrientation(screenOrientation *ScreenOrientation) *SetDeviceMetricsOverrideParams

WithScreenOrientation screen orientation override.

func (SetDeviceMetricsOverrideParams) WithScreenWidth Uses

func (p SetDeviceMetricsOverrideParams) WithScreenWidth(screenWidth int64) *SetDeviceMetricsOverrideParams

WithScreenWidth overriding screen width value in pixels (minimum 0, maximum 10000000).

func (SetDeviceMetricsOverrideParams) WithViewport Uses

func (p SetDeviceMetricsOverrideParams) WithViewport(viewport *page.Viewport) *SetDeviceMetricsOverrideParams

WithViewport if set, the visible area of the page will be overridden to this viewport. This viewport change is not observed by the page, e.g. viewport-relative elements do not change positions.

type SetDocumentCookieDisabledParams Uses

type SetDocumentCookieDisabledParams struct {
    Disabled bool `json:"disabled"` // Whether document.coookie API should be disabled.
}

SetDocumentCookieDisabledParams [no description].

func SetDocumentCookieDisabled Uses

func SetDocumentCookieDisabled(disabled bool) *SetDocumentCookieDisabledParams

SetDocumentCookieDisabled [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setDocumentCookieDisabled

parameters:

disabled - Whether document.coookie API should be disabled.

func (*SetDocumentCookieDisabledParams) Do Uses

func (p *SetDocumentCookieDisabledParams) Do(ctx context.Context) (err error)

Do executes Emulation.setDocumentCookieDisabled against the provided context.

func (SetDocumentCookieDisabledParams) MarshalEasyJSON Uses

func (v SetDocumentCookieDisabledParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetDocumentCookieDisabledParams) MarshalJSON Uses

func (v SetDocumentCookieDisabledParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetDocumentCookieDisabledParams) UnmarshalEasyJSON Uses

func (v *SetDocumentCookieDisabledParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetDocumentCookieDisabledParams) UnmarshalJSON Uses

func (v *SetDocumentCookieDisabledParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type SetEmitTouchEventsForMouseConfiguration Uses

type SetEmitTouchEventsForMouseConfiguration string

SetEmitTouchEventsForMouseConfiguration touch/gesture events configuration. Default: current platform.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setEmitTouchEventsForMouse

const (
    SetEmitTouchEventsForMouseConfigurationMobile  SetEmitTouchEventsForMouseConfiguration = "mobile"
    SetEmitTouchEventsForMouseConfigurationDesktop SetEmitTouchEventsForMouseConfiguration = "desktop"
)

SetEmitTouchEventsForMouseConfiguration values.

func (SetEmitTouchEventsForMouseConfiguration) MarshalEasyJSON Uses

func (t SetEmitTouchEventsForMouseConfiguration) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (SetEmitTouchEventsForMouseConfiguration) MarshalJSON Uses

func (t SetEmitTouchEventsForMouseConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (SetEmitTouchEventsForMouseConfiguration) String Uses

func (t SetEmitTouchEventsForMouseConfiguration) String() string

String returns the SetEmitTouchEventsForMouseConfiguration as string value.

func (*SetEmitTouchEventsForMouseConfiguration) UnmarshalEasyJSON Uses

func (t *SetEmitTouchEventsForMouseConfiguration) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*SetEmitTouchEventsForMouseConfiguration) UnmarshalJSON Uses

func (t *SetEmitTouchEventsForMouseConfiguration) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type SetEmitTouchEventsForMouseParams Uses

type SetEmitTouchEventsForMouseParams struct {
    Enabled       bool                                    `json:"enabled"`                 // Whether touch emulation based on mouse input should be enabled.
    Configuration SetEmitTouchEventsForMouseConfiguration `json:"configuration,omitempty"` // Touch/gesture events configuration. Default: current platform.
}

SetEmitTouchEventsForMouseParams [no description].

func SetEmitTouchEventsForMouse Uses

func SetEmitTouchEventsForMouse(enabled bool) *SetEmitTouchEventsForMouseParams

SetEmitTouchEventsForMouse [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setEmitTouchEventsForMouse

parameters:

enabled - Whether touch emulation based on mouse input should be enabled.

func (*SetEmitTouchEventsForMouseParams) Do Uses

func (p *SetEmitTouchEventsForMouseParams) Do(ctx context.Context) (err error)

Do executes Emulation.setEmitTouchEventsForMouse against the provided context.

func (SetEmitTouchEventsForMouseParams) MarshalEasyJSON Uses

func (v SetEmitTouchEventsForMouseParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetEmitTouchEventsForMouseParams) MarshalJSON Uses

func (v SetEmitTouchEventsForMouseParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetEmitTouchEventsForMouseParams) UnmarshalEasyJSON Uses

func (v *SetEmitTouchEventsForMouseParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetEmitTouchEventsForMouseParams) UnmarshalJSON Uses

func (v *SetEmitTouchEventsForMouseParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (SetEmitTouchEventsForMouseParams) WithConfiguration Uses

func (p SetEmitTouchEventsForMouseParams) WithConfiguration(configuration SetEmitTouchEventsForMouseConfiguration) *SetEmitTouchEventsForMouseParams

WithConfiguration touch/gesture events configuration. Default: current platform.

type SetEmulatedMediaParams Uses

type SetEmulatedMediaParams struct {
    Media    string          `json:"media,omitempty"`    // Media type to emulate. Empty string disables the override.
    Features []*MediaFeature `json:"features,omitempty"` // Media features to emulate.
}

SetEmulatedMediaParams emulates the given media type or media feature for CSS media queries.

func SetEmulatedMedia Uses

func SetEmulatedMedia() *SetEmulatedMediaParams

SetEmulatedMedia emulates the given media type or media feature for CSS media queries.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setEmulatedMedia

parameters:

func (*SetEmulatedMediaParams) Do Uses

func (p *SetEmulatedMediaParams) Do(ctx context.Context) (err error)

Do executes Emulation.setEmulatedMedia against the provided context.

func (SetEmulatedMediaParams) MarshalEasyJSON Uses

func (v SetEmulatedMediaParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetEmulatedMediaParams) MarshalJSON Uses

func (v SetEmulatedMediaParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetEmulatedMediaParams) UnmarshalEasyJSON Uses

func (v *SetEmulatedMediaParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetEmulatedMediaParams) UnmarshalJSON Uses

func (v *SetEmulatedMediaParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (SetEmulatedMediaParams) WithFeatures Uses

func (p SetEmulatedMediaParams) WithFeatures(features []*MediaFeature) *SetEmulatedMediaParams

WithFeatures media features to emulate.

func (SetEmulatedMediaParams) WithMedia Uses

func (p SetEmulatedMediaParams) WithMedia(media string) *SetEmulatedMediaParams

WithMedia media type to emulate. Empty string disables the override.

type SetEmulatedVisionDeficiencyParams Uses

type SetEmulatedVisionDeficiencyParams struct {
    Type SetEmulatedVisionDeficiencyType `json:"type"` // Vision deficiency to emulate.
}

SetEmulatedVisionDeficiencyParams emulates the given vision deficiency.

func SetEmulatedVisionDeficiency Uses

func SetEmulatedVisionDeficiency(typeVal SetEmulatedVisionDeficiencyType) *SetEmulatedVisionDeficiencyParams

SetEmulatedVisionDeficiency emulates the given vision deficiency.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setEmulatedVisionDeficiency

parameters:

type - Vision deficiency to emulate.

func (*SetEmulatedVisionDeficiencyParams) Do Uses

func (p *SetEmulatedVisionDeficiencyParams) Do(ctx context.Context) (err error)

Do executes Emulation.setEmulatedVisionDeficiency against the provided context.

func (SetEmulatedVisionDeficiencyParams) MarshalEasyJSON Uses

func (v SetEmulatedVisionDeficiencyParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetEmulatedVisionDeficiencyParams) MarshalJSON Uses

func (v SetEmulatedVisionDeficiencyParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetEmulatedVisionDeficiencyParams) UnmarshalEasyJSON Uses

func (v *SetEmulatedVisionDeficiencyParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetEmulatedVisionDeficiencyParams) UnmarshalJSON Uses

func (v *SetEmulatedVisionDeficiencyParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type SetEmulatedVisionDeficiencyType Uses

type SetEmulatedVisionDeficiencyType string

SetEmulatedVisionDeficiencyType vision deficiency to emulate.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setEmulatedVisionDeficiency

const (
    SetEmulatedVisionDeficiencyTypeNone          SetEmulatedVisionDeficiencyType = "none"
    SetEmulatedVisionDeficiencyTypeAchromatopsia SetEmulatedVisionDeficiencyType = "achromatopsia"
    SetEmulatedVisionDeficiencyTypeBlurredVision SetEmulatedVisionDeficiencyType = "blurredVision"
    SetEmulatedVisionDeficiencyTypeDeuteranopia  SetEmulatedVisionDeficiencyType = "deuteranopia"
    SetEmulatedVisionDeficiencyTypeProtanopia    SetEmulatedVisionDeficiencyType = "protanopia"
    SetEmulatedVisionDeficiencyTypeTritanopia    SetEmulatedVisionDeficiencyType = "tritanopia"
)

SetEmulatedVisionDeficiencyType values.

func (SetEmulatedVisionDeficiencyType) MarshalEasyJSON Uses

func (t SetEmulatedVisionDeficiencyType) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (SetEmulatedVisionDeficiencyType) MarshalJSON Uses

func (t SetEmulatedVisionDeficiencyType) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (SetEmulatedVisionDeficiencyType) String Uses

func (t SetEmulatedVisionDeficiencyType) String() string

String returns the SetEmulatedVisionDeficiencyType as string value.

func (*SetEmulatedVisionDeficiencyType) UnmarshalEasyJSON Uses

func (t *SetEmulatedVisionDeficiencyType) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*SetEmulatedVisionDeficiencyType) UnmarshalJSON Uses

func (t *SetEmulatedVisionDeficiencyType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type SetFocusEmulationEnabledParams Uses

type SetFocusEmulationEnabledParams struct {
    Enabled bool `json:"enabled"` // Whether to enable to disable focus emulation.
}

SetFocusEmulationEnabledParams enables or disables simulating a focused and active page.

func SetFocusEmulationEnabled Uses

func SetFocusEmulationEnabled(enabled bool) *SetFocusEmulationEnabledParams

SetFocusEmulationEnabled enables or disables simulating a focused and active page.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setFocusEmulationEnabled

parameters:

enabled - Whether to enable to disable focus emulation.

func (*SetFocusEmulationEnabledParams) Do Uses

func (p *SetFocusEmulationEnabledParams) Do(ctx context.Context) (err error)

Do executes Emulation.setFocusEmulationEnabled against the provided context.

func (SetFocusEmulationEnabledParams) MarshalEasyJSON Uses

func (v SetFocusEmulationEnabledParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetFocusEmulationEnabledParams) MarshalJSON Uses

func (v SetFocusEmulationEnabledParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetFocusEmulationEnabledParams) UnmarshalEasyJSON Uses

func (v *SetFocusEmulationEnabledParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetFocusEmulationEnabledParams) UnmarshalJSON Uses

func (v *SetFocusEmulationEnabledParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type SetGeolocationOverrideParams Uses

type SetGeolocationOverrideParams struct {
    Latitude  float64 `json:"latitude,omitempty"`  // Mock latitude
    Longitude float64 `json:"longitude,omitempty"` // Mock longitude
    Accuracy  float64 `json:"accuracy,omitempty"`  // Mock accuracy
}

SetGeolocationOverrideParams overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.

func SetGeolocationOverride Uses

func SetGeolocationOverride() *SetGeolocationOverrideParams

SetGeolocationOverride overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setGeolocationOverride

parameters:

func (*SetGeolocationOverrideParams) Do Uses

func (p *SetGeolocationOverrideParams) Do(ctx context.Context) (err error)

Do executes Emulation.setGeolocationOverride against the provided context.

func (SetGeolocationOverrideParams) MarshalEasyJSON Uses

func (v SetGeolocationOverrideParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetGeolocationOverrideParams) MarshalJSON Uses

func (v SetGeolocationOverrideParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetGeolocationOverrideParams) UnmarshalEasyJSON Uses

func (v *SetGeolocationOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetGeolocationOverrideParams) UnmarshalJSON Uses

func (v *SetGeolocationOverrideParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (SetGeolocationOverrideParams) WithAccuracy Uses

func (p SetGeolocationOverrideParams) WithAccuracy(accuracy float64) *SetGeolocationOverrideParams

WithAccuracy mock accuracy.

func (SetGeolocationOverrideParams) WithLatitude Uses

func (p SetGeolocationOverrideParams) WithLatitude(latitude float64) *SetGeolocationOverrideParams

WithLatitude mock latitude.

func (SetGeolocationOverrideParams) WithLongitude Uses

func (p SetGeolocationOverrideParams) WithLongitude(longitude float64) *SetGeolocationOverrideParams

WithLongitude mock longitude.

type SetLocaleOverrideParams Uses

type SetLocaleOverrideParams struct {
    Locale string `json:"locale,omitempty"` // ICU style C locale (e.g. "en_US"). If not specified or empty, disables the override and restores default host system locale.
}

SetLocaleOverrideParams overrides default host system locale with the specified one.

func SetLocaleOverride Uses

func SetLocaleOverride() *SetLocaleOverrideParams

SetLocaleOverride overrides default host system locale with the specified one.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setLocaleOverride

parameters:

func (*SetLocaleOverrideParams) Do Uses

func (p *SetLocaleOverrideParams) Do(ctx context.Context) (err error)

Do executes Emulation.setLocaleOverride against the provided context.

func (SetLocaleOverrideParams) MarshalEasyJSON Uses

func (v SetLocaleOverrideParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetLocaleOverrideParams) MarshalJSON Uses

func (v SetLocaleOverrideParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetLocaleOverrideParams) UnmarshalEasyJSON Uses

func (v *SetLocaleOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetLocaleOverrideParams) UnmarshalJSON Uses

func (v *SetLocaleOverrideParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (SetLocaleOverrideParams) WithLocale Uses

func (p SetLocaleOverrideParams) WithLocale(locale string) *SetLocaleOverrideParams

WithLocale iCU style C locale (e.g. "en_US"). If not specified or empty, disables the override and restores default host system locale.

type SetPageScaleFactorParams Uses

type SetPageScaleFactorParams struct {
    PageScaleFactor float64 `json:"pageScaleFactor"` // Page scale factor.
}

SetPageScaleFactorParams sets a specified page scale factor.

func SetPageScaleFactor Uses

func SetPageScaleFactor(pageScaleFactor float64) *SetPageScaleFactorParams

SetPageScaleFactor sets a specified page scale factor.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setPageScaleFactor

parameters:

pageScaleFactor - Page scale factor.

func (*SetPageScaleFactorParams) Do Uses

func (p *SetPageScaleFactorParams) Do(ctx context.Context) (err error)

Do executes Emulation.setPageScaleFactor against the provided context.

func (SetPageScaleFactorParams) MarshalEasyJSON Uses

func (v SetPageScaleFactorParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetPageScaleFactorParams) MarshalJSON Uses

func (v SetPageScaleFactorParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetPageScaleFactorParams) UnmarshalEasyJSON Uses

func (v *SetPageScaleFactorParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetPageScaleFactorParams) UnmarshalJSON Uses

func (v *SetPageScaleFactorParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type SetScriptExecutionDisabledParams Uses

type SetScriptExecutionDisabledParams struct {
    Value bool `json:"value"` // Whether script execution should be disabled in the page.
}

SetScriptExecutionDisabledParams switches script execution in the page.

func SetScriptExecutionDisabled Uses

func SetScriptExecutionDisabled(value bool) *SetScriptExecutionDisabledParams

SetScriptExecutionDisabled switches script execution in the page.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setScriptExecutionDisabled

parameters:

value - Whether script execution should be disabled in the page.

func (*SetScriptExecutionDisabledParams) Do Uses

func (p *SetScriptExecutionDisabledParams) Do(ctx context.Context) (err error)

Do executes Emulation.setScriptExecutionDisabled against the provided context.

func (SetScriptExecutionDisabledParams) MarshalEasyJSON Uses

func (v SetScriptExecutionDisabledParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetScriptExecutionDisabledParams) MarshalJSON Uses

func (v SetScriptExecutionDisabledParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetScriptExecutionDisabledParams) UnmarshalEasyJSON Uses

func (v *SetScriptExecutionDisabledParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetScriptExecutionDisabledParams) UnmarshalJSON Uses

func (v *SetScriptExecutionDisabledParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type SetScrollbarsHiddenParams Uses

type SetScrollbarsHiddenParams struct {
    Hidden bool `json:"hidden"` // Whether scrollbars should be always hidden.
}

SetScrollbarsHiddenParams [no description].

func SetScrollbarsHidden Uses

func SetScrollbarsHidden(hidden bool) *SetScrollbarsHiddenParams

SetScrollbarsHidden [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setScrollbarsHidden

parameters:

hidden - Whether scrollbars should be always hidden.

func (*SetScrollbarsHiddenParams) Do Uses

func (p *SetScrollbarsHiddenParams) Do(ctx context.Context) (err error)

Do executes Emulation.setScrollbarsHidden against the provided context.

func (SetScrollbarsHiddenParams) MarshalEasyJSON Uses

func (v SetScrollbarsHiddenParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetScrollbarsHiddenParams) MarshalJSON Uses

func (v SetScrollbarsHiddenParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetScrollbarsHiddenParams) UnmarshalEasyJSON Uses

func (v *SetScrollbarsHiddenParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetScrollbarsHiddenParams) UnmarshalJSON Uses

func (v *SetScrollbarsHiddenParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type SetTimezoneOverrideParams Uses

type SetTimezoneOverrideParams struct {
    TimezoneID string `json:"timezoneId"` // The timezone identifier. If empty, disables the override and restores default host system timezone.
}

SetTimezoneOverrideParams overrides default host system timezone with the specified one.

func SetTimezoneOverride Uses

func SetTimezoneOverride(timezoneID string) *SetTimezoneOverrideParams

SetTimezoneOverride overrides default host system timezone with the specified one.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setTimezoneOverride

parameters:

timezoneID - The timezone identifier. If empty, disables the override and restores default host system timezone.

func (*SetTimezoneOverrideParams) Do Uses

func (p *SetTimezoneOverrideParams) Do(ctx context.Context) (err error)

Do executes Emulation.setTimezoneOverride against the provided context.

func (SetTimezoneOverrideParams) MarshalEasyJSON Uses

func (v SetTimezoneOverrideParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetTimezoneOverrideParams) MarshalJSON Uses

func (v SetTimezoneOverrideParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetTimezoneOverrideParams) UnmarshalEasyJSON Uses

func (v *SetTimezoneOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetTimezoneOverrideParams) UnmarshalJSON Uses

func (v *SetTimezoneOverrideParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type SetTouchEmulationEnabledParams Uses

type SetTouchEmulationEnabledParams struct {
    Enabled        bool  `json:"enabled"`                  // Whether the touch event emulation should be enabled.
    MaxTouchPoints int64 `json:"maxTouchPoints,omitempty"` // Maximum touch points supported. Defaults to one.
}

SetTouchEmulationEnabledParams enables touch on platforms which do not support them.

func SetTouchEmulationEnabled Uses

func SetTouchEmulationEnabled(enabled bool) *SetTouchEmulationEnabledParams

SetTouchEmulationEnabled enables touch on platforms which do not support them.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setTouchEmulationEnabled

parameters:

enabled - Whether the touch event emulation should be enabled.

func (*SetTouchEmulationEnabledParams) Do Uses

func (p *SetTouchEmulationEnabledParams) Do(ctx context.Context) (err error)

Do executes Emulation.setTouchEmulationEnabled against the provided context.

func (SetTouchEmulationEnabledParams) MarshalEasyJSON Uses

func (v SetTouchEmulationEnabledParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetTouchEmulationEnabledParams) MarshalJSON Uses

func (v SetTouchEmulationEnabledParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetTouchEmulationEnabledParams) UnmarshalEasyJSON Uses

func (v *SetTouchEmulationEnabledParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetTouchEmulationEnabledParams) UnmarshalJSON Uses

func (v *SetTouchEmulationEnabledParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (SetTouchEmulationEnabledParams) WithMaxTouchPoints Uses

func (p SetTouchEmulationEnabledParams) WithMaxTouchPoints(maxTouchPoints int64) *SetTouchEmulationEnabledParams

WithMaxTouchPoints maximum touch points supported. Defaults to one.

type SetUserAgentOverrideParams Uses

type SetUserAgentOverrideParams struct {
    UserAgent         string             `json:"userAgent"`                   // User agent to use.
    AcceptLanguage    string             `json:"acceptLanguage,omitempty"`    // Browser langugage to emulate.
    Platform          string             `json:"platform,omitempty"`          // The platform navigator.platform should return.
    UserAgentMetadata *UserAgentMetadata `json:"userAgentMetadata,omitempty"` // To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData
}

SetUserAgentOverrideParams allows overriding user agent with the given string.

func SetUserAgentOverride Uses

func SetUserAgentOverride(userAgent string) *SetUserAgentOverrideParams

SetUserAgentOverride allows overriding user agent with the given string.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setUserAgentOverride

parameters:

userAgent - User agent to use.

func (*SetUserAgentOverrideParams) Do Uses

func (p *SetUserAgentOverrideParams) Do(ctx context.Context) (err error)

Do executes Emulation.setUserAgentOverride against the provided context.

func (SetUserAgentOverrideParams) MarshalEasyJSON Uses

func (v SetUserAgentOverrideParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetUserAgentOverrideParams) MarshalJSON Uses

func (v SetUserAgentOverrideParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetUserAgentOverrideParams) UnmarshalEasyJSON Uses

func (v *SetUserAgentOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetUserAgentOverrideParams) UnmarshalJSON Uses

func (v *SetUserAgentOverrideParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (SetUserAgentOverrideParams) WithAcceptLanguage Uses

func (p SetUserAgentOverrideParams) WithAcceptLanguage(acceptLanguage string) *SetUserAgentOverrideParams

WithAcceptLanguage browser langugage to emulate.

func (SetUserAgentOverrideParams) WithPlatform Uses

func (p SetUserAgentOverrideParams) WithPlatform(platform string) *SetUserAgentOverrideParams

WithPlatform the platform navigator.platform should return.

func (SetUserAgentOverrideParams) WithUserAgentMetadata Uses

func (p SetUserAgentOverrideParams) WithUserAgentMetadata(userAgentMetadata *UserAgentMetadata) *SetUserAgentOverrideParams

WithUserAgentMetadata to be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData.

type SetVirtualTimePolicyParams Uses

type SetVirtualTimePolicyParams struct {
    Policy                            VirtualTimePolicy   `json:"policy"`
    Budget                            float64             `json:"budget,omitempty"`                            // If set, after this many virtual milliseconds have elapsed virtual time will be paused and a virtualTimeBudgetExpired event is sent.
    MaxVirtualTimeTaskStarvationCount int64               `json:"maxVirtualTimeTaskStarvationCount,omitempty"` // If set this specifies the maximum number of tasks that can be run before virtual is forced forwards to prevent deadlock.
    WaitForNavigation                 bool                `json:"waitForNavigation,omitempty"`                 // If set the virtual time policy change should be deferred until any frame starts navigating. Note any previous deferred policy change is superseded.
    InitialVirtualTime                *cdp.TimeSinceEpoch `json:"initialVirtualTime,omitempty"`                // If set, base::Time::Now will be overridden to initially return this value.
}

SetVirtualTimePolicyParams turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets the current virtual time policy. Note this supersedes any previous time budget.

func SetVirtualTimePolicy Uses

func SetVirtualTimePolicy(policy VirtualTimePolicy) *SetVirtualTimePolicyParams

SetVirtualTimePolicy turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets the current virtual time policy. Note this supersedes any previous time budget.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setVirtualTimePolicy

parameters:

policy

func (*SetVirtualTimePolicyParams) Do Uses

func (p *SetVirtualTimePolicyParams) Do(ctx context.Context) (virtualTimeTicksBase float64, err error)

Do executes Emulation.setVirtualTimePolicy against the provided context.

returns:

virtualTimeTicksBase - Absolute timestamp at which virtual time was first enabled (up time in milliseconds).

func (SetVirtualTimePolicyParams) MarshalEasyJSON Uses

func (v SetVirtualTimePolicyParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetVirtualTimePolicyParams) MarshalJSON Uses

func (v SetVirtualTimePolicyParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetVirtualTimePolicyParams) UnmarshalEasyJSON Uses

func (v *SetVirtualTimePolicyParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetVirtualTimePolicyParams) UnmarshalJSON Uses

func (v *SetVirtualTimePolicyParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (SetVirtualTimePolicyParams) WithBudget Uses

func (p SetVirtualTimePolicyParams) WithBudget(budget float64) *SetVirtualTimePolicyParams

WithBudget if set, after this many virtual milliseconds have elapsed virtual time will be paused and a virtualTimeBudgetExpired event is sent.

func (SetVirtualTimePolicyParams) WithInitialVirtualTime Uses

func (p SetVirtualTimePolicyParams) WithInitialVirtualTime(initialVirtualTime *cdp.TimeSinceEpoch) *SetVirtualTimePolicyParams

WithInitialVirtualTime if set, base::Time::Now will be overridden to initially return this value.

func (SetVirtualTimePolicyParams) WithMaxVirtualTimeTaskStarvationCount Uses

func (p SetVirtualTimePolicyParams) WithMaxVirtualTimeTaskStarvationCount(maxVirtualTimeTaskStarvationCount int64) *SetVirtualTimePolicyParams

WithMaxVirtualTimeTaskStarvationCount if set this specifies the maximum number of tasks that can be run before virtual is forced forwards to prevent deadlock.

func (SetVirtualTimePolicyParams) WithWaitForNavigation Uses

func (p SetVirtualTimePolicyParams) WithWaitForNavigation(waitForNavigation bool) *SetVirtualTimePolicyParams

WithWaitForNavigation if set the virtual time policy change should be deferred until any frame starts navigating. Note any previous deferred policy change is superseded.

type SetVirtualTimePolicyReturns Uses

type SetVirtualTimePolicyReturns struct {
    VirtualTimeTicksBase float64 `json:"virtualTimeTicksBase,omitempty"` // Absolute timestamp at which virtual time was first enabled (up time in milliseconds).
}

SetVirtualTimePolicyReturns return values.

func (SetVirtualTimePolicyReturns) MarshalEasyJSON Uses

func (v SetVirtualTimePolicyReturns) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetVirtualTimePolicyReturns) MarshalJSON Uses

func (v SetVirtualTimePolicyReturns) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetVirtualTimePolicyReturns) UnmarshalEasyJSON Uses

func (v *SetVirtualTimePolicyReturns) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetVirtualTimePolicyReturns) UnmarshalJSON Uses

func (v *SetVirtualTimePolicyReturns) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type UserAgentBrandVersion Uses

type UserAgentBrandVersion struct {
    Brand   string `json:"brand"`
    Version string `json:"version"`
}

UserAgentBrandVersion used to specify User Agent Cient Hints to emulate. See https://wicg.github.io/ua-client-hints.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#type-UserAgentBrandVersion

func (UserAgentBrandVersion) MarshalEasyJSON Uses

func (v UserAgentBrandVersion) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (UserAgentBrandVersion) MarshalJSON Uses

func (v UserAgentBrandVersion) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*UserAgentBrandVersion) UnmarshalEasyJSON Uses

func (v *UserAgentBrandVersion) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*UserAgentBrandVersion) UnmarshalJSON Uses

func (v *UserAgentBrandVersion) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type UserAgentMetadata Uses

type UserAgentMetadata struct {
    Brands          []*UserAgentBrandVersion `json:"brands"`
    FullVersion     string                   `json:"fullVersion"`
    Platform        string                   `json:"platform"`
    PlatformVersion string                   `json:"platformVersion"`
    Architecture    string                   `json:"architecture"`
    Model           string                   `json:"model"`
    Mobile          bool                     `json:"mobile"`
}

UserAgentMetadata used to specify User Agent Cient Hints to emulate. See https://wicg.github.io/ua-client-hints.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#type-UserAgentMetadata

func (UserAgentMetadata) MarshalEasyJSON Uses

func (v UserAgentMetadata) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (UserAgentMetadata) MarshalJSON Uses

func (v UserAgentMetadata) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*UserAgentMetadata) UnmarshalEasyJSON Uses

func (v *UserAgentMetadata) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*UserAgentMetadata) UnmarshalJSON Uses

func (v *UserAgentMetadata) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type VirtualTimePolicy Uses

type VirtualTimePolicy string

VirtualTimePolicy advance: If the scheduler runs out of immediate work, the virtual time base may fast forward to allow the next delayed task (if any) to run; pause: The virtual time base may not advance; pauseIfNetworkFetchesPending: The virtual time base may not advance if there are any pending resource fetches.

See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#type-VirtualTimePolicy

const (
    VirtualTimePolicyAdvance                      VirtualTimePolicy = "advance"
    VirtualTimePolicyPause                        VirtualTimePolicy = "pause"
    VirtualTimePolicyPauseIfNetworkFetchesPending VirtualTimePolicy = "pauseIfNetworkFetchesPending"
)

VirtualTimePolicy values.

func (VirtualTimePolicy) MarshalEasyJSON Uses

func (t VirtualTimePolicy) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (VirtualTimePolicy) MarshalJSON Uses

func (t VirtualTimePolicy) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (VirtualTimePolicy) String Uses

func (t VirtualTimePolicy) String() string

String returns the VirtualTimePolicy as string value.

func (*VirtualTimePolicy) UnmarshalEasyJSON Uses

func (t *VirtualTimePolicy) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*VirtualTimePolicy) UnmarshalJSON Uses

func (t *VirtualTimePolicy) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

Package emulation imports 8 packages (graph) and is imported by 18 packages. Updated 2020-06-09. Refresh now. Tools for package owners.