Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTypeError = NewTypeError("TypeError")
Functions ¶
func NewTypeError ¶
Types ¶
type AnyError ¶ added in v0.11.0
type AnyError struct{ Reason any }
AnyError wraps any value as a valid go [error] value. While errors originating from Go code will always be instances of error, in JavaScript, any value can be an error.
When an error is generated in JavaScript code, and not representable directly as an error in Go, AnyError will represent the value.
type TypeError ¶
type TypeError struct{ Message string }
Represents a type that should become a TypeError in JavaScript. This is rarely created in Go code, but can happen through invalid combination of options. E.g., MutationObserver.Observe(options) will throw a TypeError if the options doesn't include one of ChildList, Attributes, or CharacterData.
Click to show internal directories.
Click to hide internal directories.