webapi: github.com/gowebapi/webapi/css/cssom/view Index | Examples | Files

package view

import "github.com/gowebapi/webapi/css/cssom/view"

Package view is to inspect and manipulate the visual view of a document.

This includes getting the position of element layout boxes, obtaining the width of the viewport through script, and also scrolling an element.

Index

Examples

Package Files

doc.go view.go

type BoxQuadOptions Uses

type BoxQuadOptions struct {
    Box        CSSBoxType
    RelativeTo *Union
}

dictionary: BoxQuadOptions

func BoxQuadOptionsFromJS Uses

func BoxQuadOptionsFromJS(value js.Wrapper) *BoxQuadOptions

BoxQuadOptionsFromJS is allocating a new BoxQuadOptions object and copy all values from input javascript object

func (*BoxQuadOptions) JSValue Uses

func (_this *BoxQuadOptions) JSValue() js.Value

JSValue is allocating a new javasript object and copy all values

type CSSBoxType Uses

type CSSBoxType int

enum: CSSBoxType

const (
    MarginCSSBoxType CSSBoxType = iota
    BorderCSSBoxType
    PaddingCSSBoxType
    ContentCSSBoxType
)

func CSSBoxTypeFromJS Uses

func CSSBoxTypeFromJS(value js.Value) CSSBoxType

CSSBoxTypeFromJS is converting a javascript value into a CSSBoxType enum value.

func (*CSSBoxType) JSValue Uses

func (this *CSSBoxType) JSValue() js.Value

JSValue is converting this enum into a javascript object

func (CSSBoxType) Value Uses

func (this CSSBoxType) Value() string

Value is converting this into javascript defined string value

type CaretPosition Uses

type CaretPosition struct {
    // Value_JS holds a reference to a javascript value
    Value_JS js.Value
}

class: CaretPosition

func CaretPositionFromJS Uses

func CaretPositionFromJS(value js.Wrapper) *CaretPosition

CaretPositionFromJS is casting a js.Wrapper into CaretPosition.

func (*CaretPosition) GetClientRect Uses

func (_this *CaretPosition) GetClientRect() (_result *geometry.DOMRect)

func (*CaretPosition) JSValue Uses

func (_this *CaretPosition) JSValue() js.Value

func (*CaretPosition) Offset Uses

func (_this *CaretPosition) Offset() uint

Offset returning attribute 'offset' with type uint (idl: unsigned long).

func (*CaretPosition) OffsetNode Uses

func (_this *CaretPosition) OffsetNode() js.Value

OffsetNode returning attribute 'offsetNode' with type js.Value (idl: Node).

Code:

var caret *view.CaretPosition

// cast to correct type
value := dom.NodeFromJS(caret.OffsetNode())

// do something with value
_ = value

type ConvertCoordinateOptions Uses

type ConvertCoordinateOptions struct {
    FromBox CSSBoxType
    ToBox   CSSBoxType
}

dictionary: ConvertCoordinateOptions

func ConvertCoordinateOptionsFromJS Uses

func ConvertCoordinateOptionsFromJS(value js.Wrapper) *ConvertCoordinateOptions

ConvertCoordinateOptionsFromJS is allocating a new ConvertCoordinateOptions object and copy all values from input javascript object

func (*ConvertCoordinateOptions) JSValue Uses

func (_this *ConvertCoordinateOptions) JSValue() js.Value

JSValue is allocating a new javasript object and copy all values

type MediaQueryList Uses

type MediaQueryList struct {
    domcore.EventTarget
}

class: MediaQueryList

func MediaQueryListFromJS Uses

func MediaQueryListFromJS(value js.Wrapper) *MediaQueryList

MediaQueryListFromJS is casting a js.Wrapper into MediaQueryList.

func (*MediaQueryList) AddEventChange Uses

func (_this *MediaQueryList) AddEventChange(listener func(event *MediaQueryListEvent, currentTarget *MediaQueryList)) js.Func

AddChange is adding doing AddEventListener for 'Change' on target. This method is returning allocated javascript function that need to be released.

func (*MediaQueryList) AddListener Uses

func (_this *MediaQueryList) AddListener(listener *domcore.EventListenerValue)

func (*MediaQueryList) Matches Uses

func (_this *MediaQueryList) Matches() bool

Matches returning attribute 'matches' with type bool (idl: boolean).

func (*MediaQueryList) Media Uses

func (_this *MediaQueryList) Media() string

Media returning attribute 'media' with type string (idl: DOMString).

func (*MediaQueryList) OnChange Uses

func (_this *MediaQueryList) OnChange() domcore.EventHandlerFunc

OnChange returning attribute 'onchange' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*MediaQueryList) RemoveListener Uses

func (_this *MediaQueryList) RemoveListener(listener *domcore.EventListenerValue)

func (*MediaQueryList) SetOnChange Uses

func (_this *MediaQueryList) SetOnChange(listener func(event *MediaQueryListEvent, currentTarget *MediaQueryList)) js.Func

SetOnChange is assigning a function to 'onchange'. This This method is returning allocated javascript function that need to be released.

type MediaQueryListEvent Uses

type MediaQueryListEvent struct {
    domcore.Event
}

class: MediaQueryListEvent

func MediaQueryListEventFromJS Uses

func MediaQueryListEventFromJS(value js.Wrapper) *MediaQueryListEvent

MediaQueryListEventFromJS is casting a js.Wrapper into MediaQueryListEvent.

func NewMediaQueryListEvent Uses

func NewMediaQueryListEvent(_type string, eventInitDict *MediaQueryListEventInit) (_result *MediaQueryListEvent)

func (*MediaQueryListEvent) Matches Uses

func (_this *MediaQueryListEvent) Matches() bool

Matches returning attribute 'matches' with type bool (idl: boolean).

func (*MediaQueryListEvent) Media Uses

func (_this *MediaQueryListEvent) Media() string

Media returning attribute 'media' with type string (idl: DOMString).

type MediaQueryListEventInit Uses

type MediaQueryListEventInit struct {
    Bubbles    bool
    Cancelable bool
    Composed   bool
    Media      string
    Matches    bool
}

dictionary: MediaQueryListEventInit

func MediaQueryListEventInitFromJS Uses

func MediaQueryListEventInitFromJS(value js.Wrapper) *MediaQueryListEventInit

MediaQueryListEventInitFromJS is allocating a new MediaQueryListEventInit object and copy all values from input javascript object

func (*MediaQueryListEventInit) JSValue Uses

func (_this *MediaQueryListEventInit) JSValue() js.Value

JSValue is allocating a new javasript object and copy all values

type Screen Uses

type Screen struct {
    // Value_JS holds a reference to a javascript value
    Value_JS js.Value
}

class: Screen

func ScreenFromJS Uses

func ScreenFromJS(value js.Wrapper) *Screen

ScreenFromJS is casting a js.Wrapper into Screen.

func (*Screen) AddEventChange Uses

func (_this *Screen) AddEventChange(listener func(event *domcore.Event, currentTarget *Screen)) js.Func

AddChange is adding doing AddEventListener for 'Change' on target. This method is returning allocated javascript function that need to be released.

func (*Screen) AvailHeight Uses

func (_this *Screen) AvailHeight() int

AvailHeight returning attribute 'availHeight' with type int (idl: long).

func (*Screen) AvailWidth Uses

func (_this *Screen) AvailWidth() int

AvailWidth returning attribute 'availWidth' with type int (idl: long).

func (*Screen) ColorDepth Uses

func (_this *Screen) ColorDepth() uint

ColorDepth returning attribute 'colorDepth' with type uint (idl: unsigned long).

func (*Screen) ColorGamut Uses

func (_this *Screen) ColorGamut() capabilities.ScreenColorGamut

ColorGamut returning attribute 'colorGamut' with type capabilities.ScreenColorGamut (idl: ScreenColorGamut).

func (*Screen) Height Uses

func (_this *Screen) Height() int

Height returning attribute 'height' with type int (idl: long).

func (*Screen) JSValue Uses

func (_this *Screen) JSValue() js.Value

func (*Screen) Luminance Uses

func (_this *Screen) Luminance() *capabilities.ScreenLuminance

Luminance returning attribute 'luminance' with type capabilities.ScreenLuminance (idl: ScreenLuminance).

func (*Screen) OnChange Uses

func (_this *Screen) OnChange() domcore.EventHandlerFunc

OnChange returning attribute 'onchange' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*Screen) Orientation Uses

func (_this *Screen) Orientation() *orientation.ScreenOrientation

Orientation returning attribute 'orientation' with type orientation.ScreenOrientation (idl: ScreenOrientation).

func (*Screen) PixelDepth Uses

func (_this *Screen) PixelDepth() uint

PixelDepth returning attribute 'pixelDepth' with type uint (idl: unsigned long).

func (*Screen) SetOnChange Uses

func (_this *Screen) SetOnChange(listener func(event *domcore.Event, currentTarget *Screen)) js.Func

SetOnChange is assigning a function to 'onchange'. This This method is returning allocated javascript function that need to be released.

func (*Screen) Width Uses

func (_this *Screen) Width() int

Width returning attribute 'width' with type int (idl: long).

type ScrollBehavior Uses

type ScrollBehavior int

enum: ScrollBehavior

const (
    AutoScrollBehavior ScrollBehavior = iota
    SmoothScrollBehavior
)

func ScrollBehaviorFromJS Uses

func ScrollBehaviorFromJS(value js.Value) ScrollBehavior

ScrollBehaviorFromJS is converting a javascript value into a ScrollBehavior enum value.

func (*ScrollBehavior) JSValue Uses

func (this *ScrollBehavior) JSValue() js.Value

JSValue is converting this enum into a javascript object

func (ScrollBehavior) Value Uses

func (this ScrollBehavior) Value() string

Value is converting this into javascript defined string value

type ScrollIntoViewOptions Uses

type ScrollIntoViewOptions struct {
    Behavior ScrollBehavior
    Block    ScrollLogicalPosition
    Inline   ScrollLogicalPosition
}

dictionary: ScrollIntoViewOptions

func ScrollIntoViewOptionsFromJS Uses

func ScrollIntoViewOptionsFromJS(value js.Wrapper) *ScrollIntoViewOptions

ScrollIntoViewOptionsFromJS is allocating a new ScrollIntoViewOptions object and copy all values from input javascript object

func (*ScrollIntoViewOptions) JSValue Uses

func (_this *ScrollIntoViewOptions) JSValue() js.Value

JSValue is allocating a new javasript object and copy all values

type ScrollLogicalPosition Uses

type ScrollLogicalPosition int

enum: ScrollLogicalPosition

const (
    StartScrollLogicalPosition ScrollLogicalPosition = iota
    CenterScrollLogicalPosition
    EndScrollLogicalPosition
    NearestScrollLogicalPosition
)

func ScrollLogicalPositionFromJS Uses

func ScrollLogicalPositionFromJS(value js.Value) ScrollLogicalPosition

ScrollLogicalPositionFromJS is converting a javascript value into a ScrollLogicalPosition enum value.

func (*ScrollLogicalPosition) JSValue Uses

func (this *ScrollLogicalPosition) JSValue() js.Value

JSValue is converting this enum into a javascript object

func (ScrollLogicalPosition) Value Uses

func (this ScrollLogicalPosition) Value() string

Value is converting this into javascript defined string value

type ScrollOptions Uses

type ScrollOptions struct {
    Behavior ScrollBehavior
}

dictionary: ScrollOptions

func ScrollOptionsFromJS Uses

func ScrollOptionsFromJS(value js.Wrapper) *ScrollOptions

ScrollOptionsFromJS is allocating a new ScrollOptions object and copy all values from input javascript object

func (*ScrollOptions) JSValue Uses

func (_this *ScrollOptions) JSValue() js.Value

JSValue is allocating a new javasript object and copy all values

type ScrollToOptions Uses

type ScrollToOptions struct {
    Behavior ScrollBehavior
    Left     float64
    Top      float64
}

dictionary: ScrollToOptions

func ScrollToOptionsFromJS Uses

func ScrollToOptionsFromJS(value js.Wrapper) *ScrollToOptions

ScrollToOptionsFromJS is allocating a new ScrollToOptions object and copy all values from input javascript object

func (*ScrollToOptions) JSValue Uses

func (_this *ScrollToOptions) JSValue() js.Value

JSValue is allocating a new javasript object and copy all values

type Union Uses

type Union struct {
    Value js.Value
}

func UnionFromJS Uses

func UnionFromJS(value js.Value) *Union

func (*Union) JSValue Uses

func (u *Union) JSValue() js.Value

Package view imports 5 packages (graph) and is imported by 3 packages. Updated 2019-09-17. Refresh now. Tools for package owners.