entity

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 License: MIT Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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