intersection

package
v0.0.0-...-41cedfc Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: BSD-3-Clause Imports: 5 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.Value) *IntersectionObserver

IntersectionObserverFromJS is casting a js.Value into IntersectionObserver.

func IntersectionObserverFromWrapper

func IntersectionObserverFromWrapper(input core.Wrapper) *IntersectionObserver

IntersectionObserverFromJS is casting from something that holds a js.Value 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

JSValue returns the js.Value or js.Null() if _this is nil

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.Value) *IntersectionObserverEntry

IntersectionObserverEntryFromJS is casting a js.Value into IntersectionObserverEntry.

func IntersectionObserverEntryFromWrapper

func IntersectionObserverEntryFromWrapper(input core.Wrapper) *IntersectionObserverEntry

IntersectionObserverEntryFromJS is casting from something that holds a js.Value 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

JSValue returns the js.Value or js.Null() if _this is nil

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.Value) *IntersectionObserverEntryInit

IntersectionObserverEntryInitFromJS is allocating a new IntersectionObserverEntryInit object and copy all values in the value javascript object.

func (*IntersectionObserverEntryInit) JSValue

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

JSValue is allocating a new javascript 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.Value) *IntersectionObserverInit

IntersectionObserverInitFromJS is allocating a new IntersectionObserverInit object and copy all values in the value javascript object.

func (*IntersectionObserverInit) JSValue

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

JSValue is allocating a new javascript 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
y or Y : Canonical URL