entity

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entity

type Entity struct {
	// contains filtered or unexported fields
}

Entity is the default Entity implementation. The zero value will generate a unique ObjectId the first time it is read.

func (*Entity) ObjectId

func (b *Entity) ObjectId() ObjectId

type ObjectId

type ObjectId = int32

An ObjectId uniquely identifies an element in the DOM. It is meant for internal use only, and shouldn't be used by users of the library.

The value is a 32bit integer so it can accurately be represented by a JavaScript number.

func NewObjectId

func NewObjectId() ObjectId

NewObjectId returns a new guaranteed atomically unique ObjectId.

Warning: This solution is temporary, and a different solution is intended to be used, so function will likely disappear in the future.

type ObjectIder added in v0.5.0

type ObjectIder interface {
	ObjectId() ObjectId
}

An ObjectIder provides a unique identifier of an object that may be retrieved from the DOM. It is part of a solution to ensure the same JS object is returned for the same DOM element.

Warning: This solution is temporary, and a different solution is intended to be used. Do not rely on this value.

Jump to

Keyboard shortcuts

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