Documentation
¶
Index ¶
- Constants
- Variables
- func CloseAll(logger zerolog.Logger, closers []io.Closer, msg string)
- func CollectFrames(ctx context.Context, receiver *values.Array, doc drivers.HTMLDocument) error
- func DeserializeStyles(input values.String) (*values.Object, error)
- func FromHTMLType(nt html.NodeType) int
- func GetInDocument(ctx context.Context, path []core.Value, doc drivers.HTMLDocument) (core.Value, core.PathError)
- func GetInElement(ctx context.Context, path []core.Value, el drivers.HTMLElement) (core.Value, core.PathError)
- func GetInNode(ctx context.Context, path []core.Value, node drivers.HTMLNode) (core.Value, core.PathError)
- func GetInPage(ctx context.Context, path []core.Value, page drivers.HTMLPage) (core.Value, core.PathError)
- func GetUserAgent(val string) string
- func IsAttribute(name string) bool
- func NewIterator(node drivers.HTMLElement) (core.Iterator, error)
- func PathToString(path []core.Value) string
- func SerializeStyles(_ context.Context, styles *values.Object) values.String
- func SetInDocument(ctx context.Context, path []core.Value, doc drivers.HTMLDocument, ...) core.PathError
- func SetInElement(ctx context.Context, path []core.Value, el drivers.HTMLElement, ...) core.PathError
- func SetInNode(_ context.Context, path []core.Value, _ drivers.HTMLNode, _ core.Value) core.PathError
- func SetInPage(ctx context.Context, path []core.Value, page drivers.HTMLPage, ...) core.PathError
- func ToHTMLType(input int) html.NodeType
- type Iterator
- type LazyValue
- func (lv *LazyValue) Mutate(ctx context.Context, mutator func(v core.Value, err error))
- func (lv *LazyValue) MutateIfReady(mutator func(v core.Value, err error))
- func (lv *LazyValue) Read(ctx context.Context) (core.Value, error)
- func (lv *LazyValue) Ready() bool
- func (lv *LazyValue) Reload(ctx context.Context)
- func (lv *LazyValue) Reset()
- type LazyValueFactory
Constants ¶
View Source
const (
AttrNameStyle = "style"
)
View Source
const RandomUserAgent = "*"
Variables ¶
View Source
var ( ErrReadOnly = core.Error(core.ErrInvalidOperation, "read only") ErrInvalidPath = core.Error(core.ErrInvalidOperation, "invalid path") )
View Source
var Attributes = []string{}/* 135 elements not displayed */
Functions ¶
func CollectFrames ¶ added in v0.8.0
func DeserializeStyles ¶ added in v0.7.0
func FromHTMLType ¶ added in v0.8.0
func GetInDocument ¶ added in v0.7.0
func GetInElement ¶ added in v0.7.0
func GetUserAgent ¶
func IsAttribute ¶
func NewIterator ¶ added in v0.7.0
func NewIterator( node drivers.HTMLElement, ) (core.Iterator, error)
func PathToString ¶ added in v0.7.0
func SerializeStyles ¶ added in v0.7.0
func SetInDocument ¶ added in v0.7.0
func SetInElement ¶ added in v0.7.0
func ToHTMLType ¶
Types ¶
type LazyValue ¶
type LazyValue struct {
// contains filtered or unexported fields
}
LazyValue represents a value with late initialization
func NewLazyValue ¶
func NewLazyValue(factory LazyValueFactory) *LazyValue
func (*LazyValue) Mutate ¶ added in v0.8.0
Mutate safely mutates an underlying value. Loads a value if it's not ready. Thread safe.
func (*LazyValue) MutateIfReady ¶ added in v0.8.0
MutateIfReady safely mutates an underlying value only if it's ready.
func (*LazyValue) Read ¶
Read returns an underlying value. Not thread safe. Should not mutated. @returns (Value) - Underlying value if successfully loaded, otherwise error
func (*LazyValue) Ready ¶
Ready indicates whether the value is ready. @returns (Boolean) - Boolean value indicating whether the value is ready.
Click to show internal directories.
Click to hide internal directories.