emulation

package
v0.0.0-...-5828393 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

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

This domain emulates different environments for the page.

Generated by the chromedp-gen command.

Index

Constants

This section is empty.

Variables

EventTypes all event types in the domain.

Functions

This section is empty.

Types

type CanEmulateParams

type CanEmulateParams struct{}

CanEmulateParams tells whether emulation is supported.

func CanEmulate

func CanEmulate() *CanEmulateParams

CanEmulate tells whether emulation is supported.

func (*CanEmulateParams) Do

func (p *CanEmulateParams) Do(ctxt context.Context, h cdp.FrameHandler) (result bool, err error)

Do executes Emulation.canEmulate.

returns:

result - True if emulation is supported.

func (CanEmulateParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (CanEmulateParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*CanEmulateParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*CanEmulateParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type CanEmulateReturns

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

CanEmulateReturns return values.

func (CanEmulateReturns) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (CanEmulateReturns) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*CanEmulateReturns) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*CanEmulateReturns) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type ClearDeviceMetricsOverrideParams

type ClearDeviceMetricsOverrideParams struct{}

ClearDeviceMetricsOverrideParams clears the overriden device metrics.

func ClearDeviceMetricsOverride

func ClearDeviceMetricsOverride() *ClearDeviceMetricsOverrideParams

ClearDeviceMetricsOverride clears the overriden device metrics.

func (*ClearDeviceMetricsOverrideParams) Do

Do executes Emulation.clearDeviceMetricsOverride.

func (ClearDeviceMetricsOverrideParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (ClearDeviceMetricsOverrideParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*ClearDeviceMetricsOverrideParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ClearDeviceMetricsOverrideParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type ClearGeolocationOverrideParams

type ClearGeolocationOverrideParams struct{}

ClearGeolocationOverrideParams clears the overriden Geolocation Position and Error.

func ClearGeolocationOverride

func ClearGeolocationOverride() *ClearGeolocationOverrideParams

ClearGeolocationOverride clears the overriden Geolocation Position and Error.

func (*ClearGeolocationOverrideParams) Do

Do executes Emulation.clearGeolocationOverride.

func (ClearGeolocationOverrideParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (ClearGeolocationOverrideParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*ClearGeolocationOverrideParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ClearGeolocationOverrideParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type EnabledConfiguration

type EnabledConfiguration string

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

const (
	EnabledConfigurationMobile  EnabledConfiguration = "mobile"
	EnabledConfigurationDesktop EnabledConfiguration = "desktop"
)

EnabledConfiguration values.

func (EnabledConfiguration) MarshalEasyJSON

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

MarshalEasyJSON satisfies easyjson.Marshaler.

func (EnabledConfiguration) MarshalJSON

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

MarshalJSON satisfies json.Marshaler.

func (EnabledConfiguration) String

func (t EnabledConfiguration) String() string

String returns the EnabledConfiguration as string value.

func (*EnabledConfiguration) UnmarshalEasyJSON

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

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*EnabledConfiguration) UnmarshalJSON

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

UnmarshalJSON satisfies json.Unmarshaler.

type EventVirtualTimeBudgetExpired

type EventVirtualTimeBudgetExpired struct{}

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

func (EventVirtualTimeBudgetExpired) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventVirtualTimeBudgetExpired) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*EventVirtualTimeBudgetExpired) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventVirtualTimeBudgetExpired) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type ForceViewportParams

type ForceViewportParams struct {
	X     float64 `json:"x"`     // X coordinate of top-left corner of the area (CSS pixels).
	Y     float64 `json:"y"`     // Y coordinate of top-left corner of the area (CSS pixels).
	Scale float64 `json:"scale"` // Scale to apply to the area (relative to a page scale of 1.0).
}

ForceViewportParams overrides the visible area of the page. The change is hidden from the page, i.e. the observable scroll position and page scale does not change. In effect, the command moves the specified area of the page into the top-left corner of the frame.

func ForceViewport

func ForceViewport(x float64, y float64, scale float64) *ForceViewportParams

ForceViewport overrides the visible area of the page. The change is hidden from the page, i.e. the observable scroll position and page scale does not change. In effect, the command moves the specified area of the page into the top-left corner of the frame.

parameters:

x - X coordinate of top-left corner of the area (CSS pixels).
y - Y coordinate of top-left corner of the area (CSS pixels).
scale - Scale to apply to the area (relative to a page scale of 1.0).

func (*ForceViewportParams) Do

Do executes Emulation.forceViewport.

func (ForceViewportParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (ForceViewportParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*ForceViewportParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ForceViewportParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type OrientationType

type OrientationType string

OrientationType orientation type.

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

OrientationType values.

func (OrientationType) MarshalEasyJSON

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

MarshalEasyJSON satisfies easyjson.Marshaler.

func (OrientationType) MarshalJSON

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

MarshalJSON satisfies json.Marshaler.

func (OrientationType) String

func (t OrientationType) String() string

String returns the OrientationType as string value.

func (*OrientationType) UnmarshalEasyJSON

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

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*OrientationType) UnmarshalJSON

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

UnmarshalJSON satisfies json.Unmarshaler.

type ResetPageScaleFactorParams

type ResetPageScaleFactorParams struct{}

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

func ResetPageScaleFactor

func ResetPageScaleFactor() *ResetPageScaleFactorParams

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

func (*ResetPageScaleFactorParams) Do

Do executes Emulation.resetPageScaleFactor.

func (ResetPageScaleFactorParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (ResetPageScaleFactorParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*ResetPageScaleFactorParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ResetPageScaleFactorParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type ResetViewportParams

type ResetViewportParams struct{}

ResetViewportParams resets the visible area of the page to the original viewport, undoing any effects of the forceViewport command.

func ResetViewport

func ResetViewport() *ResetViewportParams

ResetViewport resets the visible area of the page to the original viewport, undoing any effects of the forceViewport command.

func (*ResetViewportParams) Do

Do executes Emulation.resetViewport.

func (ResetViewportParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (ResetViewportParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*ResetViewportParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ResetViewportParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type ScreenOrientation

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

ScreenOrientation screen orientation.

func (ScreenOrientation) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (ScreenOrientation) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*ScreenOrientation) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ScreenOrientation) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type SetCPUThrottlingRateParams

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

func SetCPUThrottlingRate(rate float64) *SetCPUThrottlingRateParams

SetCPUThrottlingRate enables CPU throttling to emulate slow CPUs.

parameters:

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

func (*SetCPUThrottlingRateParams) Do

Do executes Emulation.setCPUThrottlingRate.

func (SetCPUThrottlingRateParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetCPUThrottlingRateParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*SetCPUThrottlingRateParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetCPUThrottlingRateParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type SetDeviceMetricsOverrideParams

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.
	FitWindow         bool               `json:"fitWindow"`                   // Whether a view that exceeds the available browser window area should be scaled down to fit.
	Scale             float64            `json:"scale,omitempty"`             // Scale to apply to resulting view image. Ignored in |fitWindow| mode.
	ScreenWidth       int64              `json:"screenWidth,omitempty"`       // Overriding screen width value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|.
	ScreenHeight      int64              `json:"screenHeight,omitempty"`      // Overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|.
	PositionX         int64              `json:"positionX,omitempty"`         // Overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|.
	PositionY         int64              `json:"positionY,omitempty"`         // Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|.
	ScreenOrientation *ScreenOrientation `json:"screenOrientation,omitempty"` // Screen orientation override.
}

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

func SetDeviceMetricsOverride(width int64, height int64, deviceScaleFactor float64, mobile bool, fitWindow 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).

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.
fitWindow - Whether a view that exceeds the available browser window area should be scaled down to fit.

func (*SetDeviceMetricsOverrideParams) Do

Do executes Emulation.setDeviceMetricsOverride.

func (SetDeviceMetricsOverrideParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetDeviceMetricsOverrideParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*SetDeviceMetricsOverrideParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetDeviceMetricsOverrideParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

func (SetDeviceMetricsOverrideParams) WithPositionX

WithPositionX overriding view X position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|.

func (SetDeviceMetricsOverrideParams) WithPositionY

WithPositionY overriding view Y position on screen in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|.

func (SetDeviceMetricsOverrideParams) WithScale

WithScale scale to apply to resulting view image. Ignored in |fitWindow| mode.

func (SetDeviceMetricsOverrideParams) WithScreenHeight

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

WithScreenHeight overriding screen height value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|.

func (SetDeviceMetricsOverrideParams) WithScreenOrientation

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

WithScreenOrientation screen orientation override.

func (SetDeviceMetricsOverrideParams) WithScreenWidth

WithScreenWidth overriding screen width value in pixels (minimum 0, maximum 10000000). Only used for |mobile==true|.

type SetEmulatedMediaParams

type SetEmulatedMediaParams struct {
	Media string `json:"media"` // Media type to emulate. Empty string disables the override.
}

SetEmulatedMediaParams emulates the given media for CSS media queries.

func SetEmulatedMedia

func SetEmulatedMedia(media string) *SetEmulatedMediaParams

SetEmulatedMedia emulates the given media for CSS media queries.

parameters:

media - Media type to emulate. Empty string disables the override.

func (*SetEmulatedMediaParams) Do

Do executes Emulation.setEmulatedMedia.

func (SetEmulatedMediaParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetEmulatedMediaParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*SetEmulatedMediaParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetEmulatedMediaParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type SetGeolocationOverrideParams

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

func SetGeolocationOverride() *SetGeolocationOverrideParams

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

parameters:

func (*SetGeolocationOverrideParams) Do

Do executes Emulation.setGeolocationOverride.

func (SetGeolocationOverrideParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetGeolocationOverrideParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*SetGeolocationOverrideParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetGeolocationOverrideParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

func (SetGeolocationOverrideParams) WithAccuracy

WithAccuracy mock accuracy.

func (SetGeolocationOverrideParams) WithLatitude

WithLatitude mock latitude.

func (SetGeolocationOverrideParams) WithLongitude

WithLongitude mock longitude.

type SetPageScaleFactorParams

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

SetPageScaleFactorParams sets a specified page scale factor.

func SetPageScaleFactor

func SetPageScaleFactor(pageScaleFactor float64) *SetPageScaleFactorParams

SetPageScaleFactor sets a specified page scale factor.

parameters:

pageScaleFactor - Page scale factor.

func (*SetPageScaleFactorParams) Do

Do executes Emulation.setPageScaleFactor.

func (SetPageScaleFactorParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetPageScaleFactorParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*SetPageScaleFactorParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetPageScaleFactorParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type SetScriptExecutionDisabledParams

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

func SetScriptExecutionDisabled(value bool) *SetScriptExecutionDisabledParams

SetScriptExecutionDisabled switches script execution in the page.

parameters:

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

func (*SetScriptExecutionDisabledParams) Do

Do executes Emulation.setScriptExecutionDisabled.

func (SetScriptExecutionDisabledParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetScriptExecutionDisabledParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*SetScriptExecutionDisabledParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetScriptExecutionDisabledParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type SetTouchEmulationEnabledParams

type SetTouchEmulationEnabledParams struct {
	Enabled       bool                 `json:"enabled"`                 // Whether the touch event emulation should be enabled.
	Configuration EnabledConfiguration `json:"configuration,omitempty"` // Touch/gesture events configuration. Default: current platform.
}

SetTouchEmulationEnabledParams toggles mouse event-based touch event emulation.

func SetTouchEmulationEnabled

func SetTouchEmulationEnabled(enabled bool) *SetTouchEmulationEnabledParams

SetTouchEmulationEnabled toggles mouse event-based touch event emulation.

parameters:

enabled - Whether the touch event emulation should be enabled.

func (*SetTouchEmulationEnabledParams) Do

Do executes Emulation.setTouchEmulationEnabled.

func (SetTouchEmulationEnabledParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetTouchEmulationEnabledParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*SetTouchEmulationEnabledParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetTouchEmulationEnabledParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

func (SetTouchEmulationEnabledParams) WithConfiguration

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

type SetVirtualTimePolicyParams

type SetVirtualTimePolicyParams struct {
	Policy VirtualTimePolicy `json:"policy"`
	Budget int64             `json:"budget,omitempty"` // If set, after this many virtual milliseconds have elapsed virtual time will be paused and a virtualTimeBudgetExpired event is sent.
}

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

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.

parameters:

policy

func (*SetVirtualTimePolicyParams) Do

Do executes Emulation.setVirtualTimePolicy.

func (SetVirtualTimePolicyParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetVirtualTimePolicyParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*SetVirtualTimePolicyParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetVirtualTimePolicyParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

func (SetVirtualTimePolicyParams) WithBudget

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

type SetVisibleSizeParams

type SetVisibleSizeParams struct {
	Width  int64 `json:"width"`  // Frame width (DIP).
	Height int64 `json:"height"` // Frame height (DIP).
}

SetVisibleSizeParams resizes the frame/viewport of the page. Note that this does not affect the frame's container (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported on Android.

func SetVisibleSize

func SetVisibleSize(width int64, height int64) *SetVisibleSizeParams

SetVisibleSize resizes the frame/viewport of the page. Note that this does not affect the frame's container (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported on Android.

parameters:

width - Frame width (DIP).
height - Frame height (DIP).

func (*SetVisibleSizeParams) Do

Do executes Emulation.setVisibleSize.

func (SetVisibleSizeParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetVisibleSizeParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*SetVisibleSizeParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetVisibleSizeParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type VirtualTimePolicy

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.

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

VirtualTimePolicy values.

func (VirtualTimePolicy) MarshalEasyJSON

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

MarshalEasyJSON satisfies easyjson.Marshaler.

func (VirtualTimePolicy) MarshalJSON

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

MarshalJSON satisfies json.Marshaler.

func (VirtualTimePolicy) String

func (t VirtualTimePolicy) String() string

String returns the VirtualTimePolicy as string value.

func (*VirtualTimePolicy) UnmarshalEasyJSON

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

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*VirtualTimePolicy) UnmarshalJSON

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

UnmarshalJSON satisfies json.Unmarshaler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL