Documentation ¶
Overview ¶
The scripting package implements ECMAScript execution through the v8 engine.
Index ¶
- Variables
- func CreateAttr(host *ScriptHost) *v8.FunctionTemplate
- func CreateCustomEvent(host *ScriptHost) *v8.FunctionTemplate
- func CreateDocumentFragmentPrototype(host *ScriptHost) *v8.FunctionTemplate
- func CreateDocumentPrototype(host *ScriptHost) *v8.FunctionTemplate
- func CreateElement(host *ScriptHost) *v8.FunctionTemplate
- func CreateEvent(host *ScriptHost) *v8.FunctionTemplate
- func CreateEventTarget(host *ScriptHost) *v8.FunctionTemplate
- func CreateFormData(host *ScriptHost) *v8.FunctionTemplate
- func CreateHtmlElement(host *ScriptHost) *v8.FunctionTemplate
- func CreateLocationPrototype(host *ScriptHost) *v8.FunctionTemplate
- func CreateNamedNodeMap(host *ScriptHost) *v8.FunctionTemplate
- func CreateNode(host *ScriptHost) *v8.FunctionTemplate
- func CreateNodeList(host *ScriptHost) *v8.FunctionTemplate
- func CreateShadowRootPrototype(host *ScriptHost) *v8.FunctionTemplate
- func CreateURLPrototype(host *ScriptHost) *v8.FunctionTemplate
- func CreateWindowTemplate(host *ScriptHost) *v8.FunctionTemplate
- func CreateXmlHttpRequestPrototype(host *ScriptHost) *v8.FunctionTemplate
- func GetBodyFromDocument(ctx *ScriptContext, val *v8.Value) (*browser.XHRRequestBody, error)
- func GetBodyFromXMLHttpRequestBodyInit(ctx *ScriptContext, val *v8.Value) (*browser.XHRRequestBody, error)
- func NewV8EventListener(ctx *ScriptContext, val *v8.Value) browser.EventHandler
- func TryParseArg[T any](args argumentHelper, index int, ...) (result T, err error)
- func TryParseArgs[T interface{}](ctx *ScriptContext, args []*v8.Value, index int, ...) (result T, err error)
- type ConstructorBuilder
- type Converters
- func (w Converters) DecodeUSVString(ctx *ScriptContext, val *v8.Value) (string, error)
- func (w Converters) GetArgByteString(args []*v8.Value, idx int) (result string, err error)
- func (w Converters) GetArgDOMString(args []*v8.Value, idx int) (result string, err error)
- func (w Converters) GetArgUSVString(args []*v8.Value, idx int) (result string, err error)
- func (w Converters) ToByteString(ctx *ScriptContext, str string) (*v8.Value, error)
- func (w Converters) ToNullableByteString(ctx *ScriptContext, str *string) (*v8.Value, error)
- func (w Converters) ToUSVString(ctx *ScriptContext, str string) (*v8.Value, error)
- func (w Converters) ToUnsignedShort(ctx *ScriptContext, val int) (*v8.Value, error)
- type Disposable
- type DisposeFunc
- type ESURL
- func (u ESURL) CreateInstance(ctx *ScriptContext, this *v8.Object, url string) (*v8.Value, error)
- func (u ESURL) CreateInstanceBase(ctx *ScriptContext, this *v8.Object, url string, base string) (*v8.Value, error)
- func (u ESURL) GetHash(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (u ESURL) GetHost(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (u ESURL) GetHostname(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (u ESURL) GetHref(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (u ESURL) GetInstance(info *v8.FunctionCallbackInfo) (browser.URL, error)
- func (u ESURL) GetPassword(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (u ESURL) GetPathname(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (u ESURL) GetPort(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (u ESURL) GetProtocol(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (u ESURL) GetSearch(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (u ESURL) GetUsername(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (u ESURL) NewInstance(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (u ESURL) Origin(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (u ESURL) SearchParams(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (u ESURL) SetHash(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (u ESURL) SetHost(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (u ESURL) SetHostname(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (u ESURL) SetHref(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (u ESURL) SetPassword(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (u ESURL) SetPathname(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (u ESURL) SetPort(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (u ESURL) SetProtocol(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (u ESURL) SetSearch(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (u ESURL) SetUsername(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (u ESURL) ToJSON(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- type ESWrapper
- type ESXmlHttpRequest
- func (xhr ESXmlHttpRequest) Abort(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (w ESXmlHttpRequest) CreateInstance(ctx *ScriptContext, this *v8.Object) (*v8.Value, error)
- func (xhr ESXmlHttpRequest) GetAllResponseHeaders(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (xhr ESXmlHttpRequest) GetResponseHeader(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (xhr ESXmlHttpRequest) GetResponseType(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (xhr ESXmlHttpRequest) GetTimeout(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (xhr ESXmlHttpRequest) GetWithCredentials(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (xhr ESXmlHttpRequest) NewInstance(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (xhr ESXmlHttpRequest) Open(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (xhr ESXmlHttpRequest) OverrideMimeType(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (xhr ESXmlHttpRequest) ReadyState(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (xhr ESXmlHttpRequest) Response(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (xhr ESXmlHttpRequest) ResponseText(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (xhr ESXmlHttpRequest) ResponseURL(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (xhr ESXmlHttpRequest) ResponseXML(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (xhr ESXmlHttpRequest) Send(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (xhr ESXmlHttpRequest) SetRequestHeader(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (xhr ESXmlHttpRequest) SetResponseType(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (xhr ESXmlHttpRequest) SetTimeout(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (xhr ESXmlHttpRequest) SetWithCredentials(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (xhr ESXmlHttpRequest) Status(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (xhr ESXmlHttpRequest) StatusText(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- func (xhr ESXmlHttpRequest) Upload(info *v8.FunctionCallbackInfo) (*v8.Value, error)
- type EntityLookup
- type EventLoop
- type FunctionInfo
- type Iterator
- type IteratorInstance
- type PrototypeBuilder
- func (h PrototypeBuilder[T]) CreateFunction(name string, fn func(T, argumentHelper) (*v8.Value, error))
- func (h PrototypeBuilder[T]) CreateFunctionStringToString(name string, fn func(T, string) string)
- func (h PrototypeBuilder[T]) CreateReadWriteProp(name string, get func(T) string, set func(T, string))
- func (h PrototypeBuilder[T]) CreateReadonlyProp(name string, fn func(T) string)
- func (h PrototypeBuilder[T]) CreateReadonlyProp2(name string, fn func(T, *ScriptContext) (*v8.Value, error))
- func (b PrototypeBuilder[T]) GetInstance(info *v8.FunctionCallbackInfo) (T, error)
- type ScriptContext
- func (c *ScriptContext) CacheNode(obj *v8.Object, node Entity) (*v8.Value, error)
- func (ctx *ScriptContext) Dispose()
- func (ctx *ScriptContext) Eval(script string) (interface{}, error)
- func (c *ScriptContext) GetCachedNode(this *v8.Object) (Entity, bool)
- func (c *ScriptContext) GetInstanceForNode(node Entity) (*v8.Value, error)
- func (c *ScriptContext) GetInstanceForNodeByName(constructor string, node Entity) (*v8.Value, error)
- func (ctx *ScriptContext) Run(script string) error
- func (ctx *ScriptContext) RunScript(script string) (*v8.Value, error)
- func (ctx *ScriptContext) Window() Window
- type ScriptHost
- func (host *ScriptHost) ConsoleAPIMessage(message v8.ConsoleAPIMessage)
- func (host *ScriptHost) Dispose()
- func (h *ScriptHost) GetContext(v8ctx *v8.Context) (*ScriptContext, bool)
- func (h *ScriptHost) MustGetContext(v8ctx *v8.Context) *ScriptContext
- func (host *ScriptHost) NewContext(window Window) *ScriptContext
- type Wrapper
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrIncompatibleType = errors.New("Incompatible type") ErrWrongNoOfArguments = errors.New("Not enough arguments passed") )
Functions ¶
func CreateAttr ¶
func CreateAttr(host *ScriptHost) *v8.FunctionTemplate
func CreateCustomEvent ¶
func CreateCustomEvent(host *ScriptHost) *v8.FunctionTemplate
func CreateDocumentFragmentPrototype ¶
func CreateDocumentFragmentPrototype(host *ScriptHost) *v8.FunctionTemplate
CreateDocumentFragmentPrototype currently only exists to allow code to check for inheritence, i.e., `node instanceof DocumentFragment`
func CreateDocumentPrototype ¶
func CreateDocumentPrototype(host *ScriptHost) *v8.FunctionTemplate
func CreateElement ¶
func CreateElement(host *ScriptHost) *v8.FunctionTemplate
func CreateEvent ¶
func CreateEvent(host *ScriptHost) *v8.FunctionTemplate
func CreateEventTarget ¶
func CreateEventTarget(host *ScriptHost) *v8.FunctionTemplate
func CreateFormData ¶
func CreateFormData(host *ScriptHost) *v8.FunctionTemplate
func CreateHtmlElement ¶
func CreateHtmlElement(host *ScriptHost) *v8.FunctionTemplate
func CreateLocationPrototype ¶
func CreateLocationPrototype(host *ScriptHost) *v8.FunctionTemplate
func CreateNamedNodeMap ¶
func CreateNamedNodeMap(host *ScriptHost) *v8.FunctionTemplate
func CreateNode ¶
func CreateNode(host *ScriptHost) *v8.FunctionTemplate
func CreateNodeList ¶
func CreateNodeList(host *ScriptHost) *v8.FunctionTemplate
func CreateShadowRootPrototype ¶
func CreateShadowRootPrototype(host *ScriptHost) *v8.FunctionTemplate
CreateShadowRootPrototype currently only exists to allow code to check for inheritence, i.e., `node instanceof DocumentFragment`. This is performed by HTMX; but it doesn't itself _create_ a shadow root.
func CreateURLPrototype ¶
func CreateURLPrototype(host *ScriptHost) *v8.FunctionTemplate
func CreateWindowTemplate ¶
func CreateWindowTemplate(host *ScriptHost) *v8.FunctionTemplate
func CreateXmlHttpRequestPrototype ¶
func CreateXmlHttpRequestPrototype(host *ScriptHost) *v8.FunctionTemplate
func GetBodyFromDocument ¶
func GetBodyFromDocument(ctx *ScriptContext, val *v8.Value) (*browser.XHRRequestBody, error)
func GetBodyFromXMLHttpRequestBodyInit ¶
func GetBodyFromXMLHttpRequestBodyInit( ctx *ScriptContext, val *v8.Value, ) (*browser.XHRRequestBody, error)
func NewV8EventListener ¶
func NewV8EventListener(ctx *ScriptContext, val *v8.Value) browser.EventHandler
func TryParseArg ¶
func TryParseArgs ¶
func TryParseArgs[T interface{}]( ctx *ScriptContext, args []*v8.Value, index int, parsers ...func(*ScriptContext, *v8.Value) (T, error), ) (result T, err error)
Types ¶
type ConstructorBuilder ¶
type ConstructorBuilder[T any] struct { // contains filtered or unexported fields }
func NewConstructorBuilder ¶
func NewConstructorBuilder[T any]( host *ScriptHost, cb v8.FunctionCallbackWithError, ) ConstructorBuilder[T]
func NewIllegalConstructorBuilder ¶
func NewIllegalConstructorBuilder[T any](host *ScriptHost) ConstructorBuilder[T]
func (ConstructorBuilder[T]) GetInstance ¶
func (b ConstructorBuilder[T]) GetInstance(info *v8.FunctionCallbackInfo) (T, error)
func (ConstructorBuilder[T]) NewInstanceBuilder ¶
func (c ConstructorBuilder[T]) NewInstanceBuilder() PrototypeBuilder[T]
func (ConstructorBuilder[T]) NewPrototypeBuilder ¶
func (c ConstructorBuilder[T]) NewPrototypeBuilder() PrototypeBuilder[T]
func (*ConstructorBuilder[T]) SetDefaultInstanceLookup ¶
func (c *ConstructorBuilder[T]) SetDefaultInstanceLookup()
type Converters ¶
type Converters struct{}
func (Converters) DecodeUSVString ¶
func (w Converters) DecodeUSVString(ctx *ScriptContext, val *v8.Value) (string, error)
func (Converters) GetArgByteString ¶
func (Converters) GetArgDOMString ¶
func (Converters) GetArgUSVString ¶
func (Converters) ToByteString ¶
func (w Converters) ToByteString(ctx *ScriptContext, str string) (*v8.Value, error)
func (Converters) ToNullableByteString ¶
func (w Converters) ToNullableByteString(ctx *ScriptContext, str *string) (*v8.Value, error)
func (Converters) ToUSVString ¶
func (w Converters) ToUSVString(ctx *ScriptContext, str string) (*v8.Value, error)
func (Converters) ToUnsignedShort ¶
func (w Converters) ToUnsignedShort(ctx *ScriptContext, val int) (*v8.Value, error)
type Disposable ¶
type Disposable interface {
Dispose()
}
type DisposeFunc ¶
type DisposeFunc func()
func (DisposeFunc) Dispose ¶
func (fn DisposeFunc) Dispose()
type ESURL ¶
type ESURL struct { Converters // contains filtered or unexported fields }
func NewESURL ¶
func NewESURL(host *ScriptHost) ESURL
func (ESURL) CreateInstance ¶
func (ESURL) CreateInstanceBase ¶
func (ESURL) GetHostname ¶
func (ESURL) GetInstance ¶
func (ESURL) GetPassword ¶
func (ESURL) GetPathname ¶
func (ESURL) GetProtocol ¶
func (ESURL) GetUsername ¶
func (ESURL) NewInstance ¶
func (ESURL) SearchParams ¶
func (ESURL) SetHostname ¶
func (ESURL) SetPassword ¶
func (ESURL) SetPathname ¶
func (ESURL) SetProtocol ¶
func (ESURL) SetUsername ¶
type ESWrapper ¶
type ESWrapper[T Entity] struct { Converters // contains filtered or unexported fields }
ESWrapper serves as a helper for building v8 wrapping code around go objects. Generated code assumes that a wrapper type is used with specific helper methods implemented.
func NewESWrapper ¶
func NewESWrapper[T Entity](host *ScriptHost) ESWrapper[T]
func (ESWrapper[T]) GetInstance ¶
func (w ESWrapper[T]) GetInstance(info *v8.FunctionCallbackInfo) (result T, err error)
type ESXmlHttpRequest ¶
type ESXmlHttpRequest struct{ ESWrapper[XmlHttpRequest] }
func NewESXmlHttpRequest ¶
func NewESXmlHttpRequest(host *ScriptHost) ESXmlHttpRequest
func (ESXmlHttpRequest) Abort ¶
func (xhr ESXmlHttpRequest) Abort(info *v8.FunctionCallbackInfo) (*v8.Value, error)
func (ESXmlHttpRequest) CreateInstance ¶
func (w ESXmlHttpRequest) CreateInstance(ctx *ScriptContext, this *v8.Object) (*v8.Value, error)
func (ESXmlHttpRequest) GetAllResponseHeaders ¶
func (xhr ESXmlHttpRequest) GetAllResponseHeaders(info *v8.FunctionCallbackInfo) (*v8.Value, error)
func (ESXmlHttpRequest) GetResponseHeader ¶
func (xhr ESXmlHttpRequest) GetResponseHeader(info *v8.FunctionCallbackInfo) (*v8.Value, error)
func (ESXmlHttpRequest) GetResponseType ¶
func (xhr ESXmlHttpRequest) GetResponseType(info *v8.FunctionCallbackInfo) (*v8.Value, error)
func (ESXmlHttpRequest) GetTimeout ¶
func (xhr ESXmlHttpRequest) GetTimeout(info *v8.FunctionCallbackInfo) (*v8.Value, error)
func (ESXmlHttpRequest) GetWithCredentials ¶
func (xhr ESXmlHttpRequest) GetWithCredentials(info *v8.FunctionCallbackInfo) (*v8.Value, error)
func (ESXmlHttpRequest) NewInstance ¶
func (xhr ESXmlHttpRequest) NewInstance(info *v8.FunctionCallbackInfo) (*v8.Value, error)
func (ESXmlHttpRequest) Open ¶
func (xhr ESXmlHttpRequest) Open(info *v8.FunctionCallbackInfo) (*v8.Value, error)
func (ESXmlHttpRequest) OverrideMimeType ¶
func (xhr ESXmlHttpRequest) OverrideMimeType(info *v8.FunctionCallbackInfo) (*v8.Value, error)
func (ESXmlHttpRequest) ReadyState ¶
func (xhr ESXmlHttpRequest) ReadyState(info *v8.FunctionCallbackInfo) (*v8.Value, error)
func (ESXmlHttpRequest) Response ¶
func (xhr ESXmlHttpRequest) Response(info *v8.FunctionCallbackInfo) (*v8.Value, error)
func (ESXmlHttpRequest) ResponseText ¶
func (xhr ESXmlHttpRequest) ResponseText(info *v8.FunctionCallbackInfo) (*v8.Value, error)
func (ESXmlHttpRequest) ResponseURL ¶
func (xhr ESXmlHttpRequest) ResponseURL(info *v8.FunctionCallbackInfo) (*v8.Value, error)
func (ESXmlHttpRequest) ResponseXML ¶
func (xhr ESXmlHttpRequest) ResponseXML(info *v8.FunctionCallbackInfo) (*v8.Value, error)
func (ESXmlHttpRequest) Send ¶
func (xhr ESXmlHttpRequest) Send(info *v8.FunctionCallbackInfo) (*v8.Value, error)
func (ESXmlHttpRequest) SetRequestHeader ¶
func (xhr ESXmlHttpRequest) SetRequestHeader(info *v8.FunctionCallbackInfo) (*v8.Value, error)
func (ESXmlHttpRequest) SetResponseType ¶
func (xhr ESXmlHttpRequest) SetResponseType(info *v8.FunctionCallbackInfo) (*v8.Value, error)
func (ESXmlHttpRequest) SetTimeout ¶
func (xhr ESXmlHttpRequest) SetTimeout(info *v8.FunctionCallbackInfo) (*v8.Value, error)
func (ESXmlHttpRequest) SetWithCredentials ¶
func (xhr ESXmlHttpRequest) SetWithCredentials(info *v8.FunctionCallbackInfo) (*v8.Value, error)
func (ESXmlHttpRequest) Status ¶
func (xhr ESXmlHttpRequest) Status(info *v8.FunctionCallbackInfo) (*v8.Value, error)
func (ESXmlHttpRequest) StatusText ¶
func (xhr ESXmlHttpRequest) StatusText(info *v8.FunctionCallbackInfo) (*v8.Value, error)
func (ESXmlHttpRequest) Upload ¶
func (xhr ESXmlHttpRequest) Upload(info *v8.FunctionCallbackInfo) (*v8.Value, error)
type EntityLookup ¶
type EntityLookup[T any] func(value T, ctx *ScriptContext) (*v8.Value, error)
type EventLoop ¶
type EventLoop struct {
// contains filtered or unexported fields
}
func (*EventLoop) Start ¶
func (l *EventLoop) Start() Disposable
type FunctionInfo ¶
type FunctionInfo[T any] struct { // contains filtered or unexported fields }
type Iterator ¶
type Iterator[T any] struct { // contains filtered or unexported fields }
func NewIterator ¶
func NewIterator[T any](host *ScriptHost, entityLookup EntityLookup[T]) Iterator[T]
func (Iterator[T]) NewIterator ¶
func (Iterator[T]) NewIteratorInstance ¶
func (i Iterator[T]) NewIteratorInstance(context *ScriptContext, items []T) (*v8.Value, error)
type IteratorInstance ¶
type PrototypeBuilder ¶
type PrototypeBuilder[T any] struct { // contains filtered or unexported fields }
func (PrototypeBuilder[T]) CreateFunction ¶
func (h PrototypeBuilder[T]) CreateFunction( name string, fn func(T, argumentHelper) (*v8.Value, error), )
func (PrototypeBuilder[T]) CreateFunctionStringToString ¶
func (h PrototypeBuilder[T]) CreateFunctionStringToString(name string, fn func(T, string) string)
func (PrototypeBuilder[T]) CreateReadWriteProp ¶
func (h PrototypeBuilder[T]) CreateReadWriteProp( name string, get func(T) string, set func(T, string), )
func (PrototypeBuilder[T]) CreateReadonlyProp ¶
func (h PrototypeBuilder[T]) CreateReadonlyProp(name string, fn func(T) string)
func (PrototypeBuilder[T]) CreateReadonlyProp2 ¶
func (h PrototypeBuilder[T]) CreateReadonlyProp2( name string, fn func(T, *ScriptContext) (*v8.Value, error), )
func (PrototypeBuilder[T]) GetInstance ¶
func (b PrototypeBuilder[T]) GetInstance(info *v8.FunctionCallbackInfo) (T, error)
type ScriptContext ¶
type ScriptContext struct {
// contains filtered or unexported fields
}
func (*ScriptContext) Dispose ¶
func (ctx *ScriptContext) Dispose()
func (*ScriptContext) Eval ¶
func (ctx *ScriptContext) Eval(script string) (interface{}, error)
func (*ScriptContext) GetCachedNode ¶
func (c *ScriptContext) GetCachedNode(this *v8.Object) (Entity, bool)
func (*ScriptContext) GetInstanceForNode ¶
func (c *ScriptContext) GetInstanceForNode( node Entity, ) (*v8.Value, error)
func (*ScriptContext) GetInstanceForNodeByName ¶
func (c *ScriptContext) GetInstanceForNodeByName( constructor string, node Entity, ) (*v8.Value, error)
func (*ScriptContext) Run ¶
func (ctx *ScriptContext) Run(script string) error
func (*ScriptContext) RunScript ¶
func (ctx *ScriptContext) RunScript(script string) (*v8.Value, error)
func (*ScriptContext) Window ¶
func (ctx *ScriptContext) Window() Window
type ScriptHost ¶
type ScriptHost struct {
// contains filtered or unexported fields
}
func NewScriptHost ¶
func NewScriptHost() *ScriptHost
func (*ScriptHost) ConsoleAPIMessage ¶
func (host *ScriptHost) ConsoleAPIMessage(message v8.ConsoleAPIMessage)
func (*ScriptHost) Dispose ¶
func (host *ScriptHost) Dispose()
func (*ScriptHost) GetContext ¶
func (h *ScriptHost) GetContext(v8ctx *v8.Context) (*ScriptContext, bool)
func (*ScriptHost) MustGetContext ¶
func (h *ScriptHost) MustGetContext(v8ctx *v8.Context) *ScriptContext
func (*ScriptHost) NewContext ¶
func (host *ScriptHost) NewContext(window Window) *ScriptContext
type Wrapper ¶
type Wrapper ScriptHost
func (*Wrapper) NewScriptEngine ¶
func (w *Wrapper) NewScriptEngine(window Window) browser.ScriptEngine
Source Files ¶
- argument_helper.go
- document.go
- document_fragment.go
- element.go
- es_wrapper.go
- event_loop.go
- event_target.go
- form_data.go
- html_element.go
- html_elements.go
- iterator.go
- location.go
- named_node_map.go
- node.go
- node_list.go
- package.go
- polyfills.go
- script_host.go
- shadow_root.go
- template_builder.go
- url.go
- url_generated.go
- window.go
- xml_http_request.go
- xml_http_request_generated.go
Click to show internal directories.
Click to hide internal directories.