intersection

package
Version: v0.0.0-...-704d94b Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package intersection is used to understand the visibility and position of DOM elements ("targets") relative to a containing element or to the top-level viewport ("root").

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IntersectionObserver

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

class: IntersectionObserver

func IntersectionObserverFromJS

func IntersectionObserverFromJS(value js.Wrapper) *IntersectionObserver

IntersectionObserverFromJS is casting a js.Wrapper into IntersectionObserver.

func NewIntersectionObserver

func NewIntersectionObserver(callback *IntersectionObserverCallback, options *IntersectionObserverInit) (_result *IntersectionObserver)

func (*IntersectionObserver) Disconnect

func (_this *IntersectionObserver) Disconnect()

func (*IntersectionObserver) JSValue

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

func (*IntersectionObserver) Observe

func (_this *IntersectionObserver) Observe(target *dom.Element)

func (*IntersectionObserver) Root

func (_this *IntersectionObserver) Root() *dom.Element

Root returning attribute 'root' with type dom.Element (idl: Element).

func (*IntersectionObserver) RootMargin

func (_this *IntersectionObserver) RootMargin() string

RootMargin returning attribute 'rootMargin' with type string (idl: DOMString).

func (*IntersectionObserver) TakeRecords

func (_this *IntersectionObserver) TakeRecords() (_result []*IntersectionObserverEntry)

func (*IntersectionObserver) Thresholds

func (_this *IntersectionObserver) Thresholds() *javascript.FrozenArray

Thresholds returning attribute 'thresholds' with type javascript.FrozenArray (idl: FrozenArray).

func (*IntersectionObserver) Unobserve

func (_this *IntersectionObserver) Unobserve(target *dom.Element)

type IntersectionObserverCallback

type IntersectionObserverCallback js.Func

IntersectionObserverCallback is a javascript function type.

Call Release() when done to release resouces allocated to this type.

type IntersectionObserverCallbackFunc

type IntersectionObserverCallbackFunc func(entries []*IntersectionObserverEntry, observer *IntersectionObserver)

callback: IntersectionObserverCallback

func IntersectionObserverCallbackFromJS

func IntersectionObserverCallbackFromJS(_value js.Value) IntersectionObserverCallbackFunc

type IntersectionObserverEntry

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

class: IntersectionObserverEntry

func IntersectionObserverEntryFromJS

func IntersectionObserverEntryFromJS(value js.Wrapper) *IntersectionObserverEntry

IntersectionObserverEntryFromJS is casting a js.Wrapper into IntersectionObserverEntry.

func NewIntersectionObserverEntry

func NewIntersectionObserverEntry(intersectionObserverEntryInit *IntersectionObserverEntryInit) (_result *IntersectionObserverEntry)

func (*IntersectionObserverEntry) BoundingClientRect

func (_this *IntersectionObserverEntry) BoundingClientRect() *geometry.DOMRectReadOnly

BoundingClientRect returning attribute 'boundingClientRect' with type geometry.DOMRectReadOnly (idl: DOMRectReadOnly).

func (*IntersectionObserverEntry) IntersectionRatio

func (_this *IntersectionObserverEntry) IntersectionRatio() float64

IntersectionRatio returning attribute 'intersectionRatio' with type float64 (idl: double).

func (*IntersectionObserverEntry) IntersectionRect

func (_this *IntersectionObserverEntry) IntersectionRect() *geometry.DOMRectReadOnly

IntersectionRect returning attribute 'intersectionRect' with type geometry.DOMRectReadOnly (idl: DOMRectReadOnly).

func (*IntersectionObserverEntry) IsIntersecting

func (_this *IntersectionObserverEntry) IsIntersecting() bool

IsIntersecting returning attribute 'isIntersecting' with type bool (idl: boolean).

func (*IntersectionObserverEntry) JSValue

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

func (*IntersectionObserverEntry) RootBounds

func (_this *IntersectionObserverEntry) RootBounds() *geometry.DOMRectReadOnly

RootBounds returning attribute 'rootBounds' with type geometry.DOMRectReadOnly (idl: DOMRectReadOnly).

func (*IntersectionObserverEntry) Target

func (_this *IntersectionObserverEntry) Target() *dom.Element

Target returning attribute 'target' with type dom.Element (idl: Element).

func (*IntersectionObserverEntry) Time

func (_this *IntersectionObserverEntry) Time() float64

Time returning attribute 'time' with type float64 (idl: double).

type IntersectionObserverEntryInit

type IntersectionObserverEntryInit struct {
	Time               float64
	RootBounds         *geometry.DOMRectInit
	BoundingClientRect *geometry.DOMRectInit
	IntersectionRect   *geometry.DOMRectInit
	IsIntersecting     bool
	IntersectionRatio  float64
	Target             *dom.Element
}

dictionary: IntersectionObserverEntryInit

func IntersectionObserverEntryInitFromJS

func IntersectionObserverEntryInitFromJS(value js.Wrapper) *IntersectionObserverEntryInit

IntersectionObserverEntryInitFromJS is allocating a new IntersectionObserverEntryInit object and copy all values from input javascript object

func (*IntersectionObserverEntryInit) JSValue

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

JSValue is allocating a new javasript object and copy all values

type IntersectionObserverInit

type IntersectionObserverInit struct {
	Root       *dom.Element
	RootMargin string
	Threshold  *Union
}

dictionary: IntersectionObserverInit

func IntersectionObserverInitFromJS

func IntersectionObserverInitFromJS(value js.Wrapper) *IntersectionObserverInit

IntersectionObserverInitFromJS is allocating a new IntersectionObserverInit object and copy all values from input javascript object

func (*IntersectionObserverInit) JSValue

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

JSValue is allocating a new javasript object and copy all values

type Union

type Union struct {
	Value js.Value
}

func UnionFromJS

func UnionFromJS(value js.Value) *Union

func (*Union) JSValue

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

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