html

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: May 11, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestOption

type RequestOption = func(req *xmlHttpRequest)

func RequestOptionAsync

func RequestOptionAsync(
	val bool,
) RequestOption

func RequestOptionPassword

func RequestOptionPassword(_ string) RequestOption

func RequestOptionUserName

func RequestOptionUserName(_ string) RequestOption

type XHREvent

type XHREvent = string
const (
	XHREventLoad      XHREvent = "load"
	XHREventLoadstart XHREvent = "loadstart"
	XHREventLoadend   XHREvent = "loadend"
)

type XmlHttpRequest

type XmlHttpRequest interface {
	event.EventTarget
	Abort() error
	Open(string, string, ...RequestOption)

	// Deprecated: This just callse [XmlHttpRequest.SendBody] passing a nil body. This will
	// eventually change to accept a body argument of type [io.Reader];
	//
	// For a smooth transition, chande all calls to this function to call
	// [XmlHttpRequest.SendBody] passing nil.
	Send() error
	SendBody(body io.Reader) error
	Status() int
	StatusText() string
	ResponseText() string
	SetRequestHeader(name string, value string)
	GetAllResponseHeaders() (res string, err error)
	OverrideMimeType(mimeType string) error
	GetResponseHeader(headerName string) *string
	SetWithCredentials(val bool) error
	WithCredentials() bool
	ResponseURL() string
	Response() string
	SetTimeout(int) error
	Timeout() int
}

func NewXmlHttpRequest

func NewXmlHttpRequest(ctx html.BrowsingContext, clock *clock.Clock) XmlHttpRequest

Jump to

Keyboard shortcuts

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