device

package
Version: v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package device contains device emulation definitions for use with chromedp's Emulate action.

Index

Constants

View Source
const (
	// Reset is the reset device.
	Reset infoType = iota

	// BlackberryPlayBook is the "Blackberry PlayBook" device.
	BlackberryPlayBook

	// BlackberryPlayBooklandscape is the "Blackberry PlayBook landscape" device.
	BlackberryPlayBooklandscape

	// BlackBerryZ30 is the "BlackBerry Z30" device.
	BlackBerryZ30

	// BlackBerryZ30landscape is the "BlackBerry Z30 landscape" device.
	BlackBerryZ30landscape

	// GalaxyNote3 is the "Galaxy Note 3" device.
	GalaxyNote3

	// GalaxyNote3landscape is the "Galaxy Note 3 landscape" device.
	GalaxyNote3landscape

	// GalaxyNoteII is the "Galaxy Note II" device.
	GalaxyNoteII

	// GalaxyNoteIIlandscape is the "Galaxy Note II landscape" device.
	GalaxyNoteIIlandscape

	// GalaxySIII is the "Galaxy S III" device.
	GalaxySIII

	// GalaxySIIIlandscape is the "Galaxy S III landscape" device.
	GalaxySIIIlandscape

	// GalaxyS5 is the "Galaxy S5" device.
	GalaxyS5

	// GalaxyS5landscape is the "Galaxy S5 landscape" device.
	GalaxyS5landscape

	// IPad is the "iPad" device.
	IPad

	// IPadlandscape is the "iPad landscape" device.
	IPadlandscape

	// IPadMini is the "iPad Mini" device.
	IPadMini

	// IPadMinilandscape is the "iPad Mini landscape" device.
	IPadMinilandscape

	// IPadPro is the "iPad Pro" device.
	IPadPro

	// IPadProlandscape is the "iPad Pro landscape" device.
	IPadProlandscape

	// IPhone4 is the "iPhone 4" device.
	IPhone4

	// IPhone4landscape is the "iPhone 4 landscape" device.
	IPhone4landscape

	// IPhone5 is the "iPhone 5" device.
	IPhone5

	// IPhone5landscape is the "iPhone 5 landscape" device.
	IPhone5landscape

	// IPhone6 is the "iPhone 6" device.
	IPhone6

	// IPhone6landscape is the "iPhone 6 landscape" device.
	IPhone6landscape

	// IPhone6Plus is the "iPhone 6 Plus" device.
	IPhone6Plus

	// IPhone6Pluslandscape is the "iPhone 6 Plus landscape" device.
	IPhone6Pluslandscape

	// IPhone7 is the "iPhone 7" device.
	IPhone7

	// IPhone7landscape is the "iPhone 7 landscape" device.
	IPhone7landscape

	// IPhone7Plus is the "iPhone 7 Plus" device.
	IPhone7Plus

	// IPhone7Pluslandscape is the "iPhone 7 Plus landscape" device.
	IPhone7Pluslandscape

	// IPhone8 is the "iPhone 8" device.
	IPhone8

	// IPhone8landscape is the "iPhone 8 landscape" device.
	IPhone8landscape

	// IPhone8Plus is the "iPhone 8 Plus" device.
	IPhone8Plus

	// IPhone8Pluslandscape is the "iPhone 8 Plus landscape" device.
	IPhone8Pluslandscape

	// IPhoneSE is the "iPhone SE" device.
	IPhoneSE

	// IPhoneSElandscape is the "iPhone SE landscape" device.
	IPhoneSElandscape

	// IPhoneX is the "iPhone X" device.
	IPhoneX

	// IPhoneXlandscape is the "iPhone X landscape" device.
	IPhoneXlandscape

	// IPhoneXR is the "iPhone XR" device.
	IPhoneXR

	// IPhoneXRlandscape is the "iPhone XR landscape" device.
	IPhoneXRlandscape

	// JioPhone2 is the "JioPhone 2" device.
	JioPhone2

	// JioPhone2landscape is the "JioPhone 2 landscape" device.
	JioPhone2landscape

	// KindleFireHDX is the "Kindle Fire HDX" device.
	KindleFireHDX

	// KindleFireHDXlandscape is the "Kindle Fire HDX landscape" device.
	KindleFireHDXlandscape

	// LGOptimusL70 is the "LG Optimus L70" device.
	LGOptimusL70

	// LGOptimusL70landscape is the "LG Optimus L70 landscape" device.
	LGOptimusL70landscape

	// MicrosoftLumia550 is the "Microsoft Lumia 550" device.
	MicrosoftLumia550

	// MicrosoftLumia950 is the "Microsoft Lumia 950" device.
	MicrosoftLumia950

	// MicrosoftLumia950landscape is the "Microsoft Lumia 950 landscape" device.
	MicrosoftLumia950landscape

	// Nexus10 is the "Nexus 10" device.
	Nexus10

	// Nexus10landscape is the "Nexus 10 landscape" device.
	Nexus10landscape

	// Nexus4 is the "Nexus 4" device.
	Nexus4

	// Nexus4landscape is the "Nexus 4 landscape" device.
	Nexus4landscape

	// Nexus5 is the "Nexus 5" device.
	Nexus5

	// Nexus5landscape is the "Nexus 5 landscape" device.
	Nexus5landscape

	// Nexus5X is the "Nexus 5X" device.
	Nexus5X

	// Nexus5Xlandscape is the "Nexus 5X landscape" device.
	Nexus5Xlandscape

	// Nexus6 is the "Nexus 6" device.
	Nexus6

	// Nexus6landscape is the "Nexus 6 landscape" device.
	Nexus6landscape

	// Nexus6P is the "Nexus 6P" device.
	Nexus6P

	// Nexus6Plandscape is the "Nexus 6P landscape" device.
	Nexus6Plandscape

	// Nexus7 is the "Nexus 7" device.
	Nexus7

	// Nexus7landscape is the "Nexus 7 landscape" device.
	Nexus7landscape

	// NokiaLumia520 is the "Nokia Lumia 520" device.
	NokiaLumia520

	// NokiaLumia520landscape is the "Nokia Lumia 520 landscape" device.
	NokiaLumia520landscape

	// NokiaN9 is the "Nokia N9" device.
	NokiaN9

	// NokiaN9landscape is the "Nokia N9 landscape" device.
	NokiaN9landscape

	// Pixel2 is the "Pixel 2" device.
	Pixel2

	// Pixel2landscape is the "Pixel 2 landscape" device.
	Pixel2landscape

	// Pixel2XL is the "Pixel 2 XL" device.
	Pixel2XL

	// Pixel2XLlandscape is the "Pixel 2 XL landscape" device.
	Pixel2XLlandscape
)

Devices.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	// Name is the device name.
	Name string

	// UserAgent is the device user agent string.
	UserAgent string

	// Width is the viewport width.
	Width int64

	// Height is the viewport height.
	Height int64

	// Scale is the device viewport scale factor.
	Scale float64

	// Landscape indicates whether or not the device is in landscape mode or
	// not.
	Landscape bool

	// Mobile indicates whether it is a mobile device or not.
	Mobile bool

	// Touch indicates whether the device has touch enabled.
	Touch bool
}

Info holds device information for use with chromedp.Emulate.

func (Info) Device

func (i Info) Device() Info

Device satisfies chromedp.Device.

func (Info) String

func (i Info) String() string

String satisfies fmt.Stringer.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL