Documentation
¶
Overview ¶
Package yaegi はYaegiを使ったGrowseページのRuntimeを実装する。
Index ¶
- type Runtime
- func (r *Runtime) DispatchHashChange(oldURL, newURL string)
- func (r *Runtime) DispatchPageEvent(callback func() bool) bool
- func (r *Runtime) DispatchPopState(state string)
- func (r *Runtime) HasAnimationFrameCallbacks() bool
- func (r *Runtime) Load(ctx context.Context, scripts []runtimemodel.Script, ...) error
- func (r *Runtime) RunAnimationFrame(current time.Time) bool
- func (r *Runtime) SetBackground(background bool)
- func (r *Runtime) Start(ctx context.Context) error
- func (r *Runtime) Stop() error
- func (r *Runtime) UpdateLocation(documentURL *url.URL)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime は1ページ専用のYaegiインタープリターである。
func (*Runtime) DispatchHashChange ¶ added in v0.9.0
DispatchHashChange はhashchange相当EventをPage callback queueへ追加する。
func (*Runtime) DispatchPageEvent ¶ added in v0.9.0
DispatchPageEvent runs a browser-originated DOM event on the page queue and waits for cancelation/default-action state to become observable.
func (*Runtime) DispatchPopState ¶ added in v0.9.0
DispatchPopState はpopstate相当EventをPage callback queueへ追加する。
func (*Runtime) HasAnimationFrameCallbacks ¶ added in v0.9.0
HasAnimationFrameCallbacks reports whether the page requested another frame.
func (*Runtime) Load ¶
func (r *Runtime) Load(ctx context.Context, scripts []runtimemodel.Script, environment runtimemodel.Environment) error
Load はスクリプトを検証し、実行せずにインタープリターを準備する。
func (*Runtime) RunAnimationFrame ¶ added in v0.9.0
RunAnimationFrame synchronously delivers one frame through the page queue.
func (*Runtime) SetBackground ¶ added in v0.10.0
SetBackground applies hidden-tab scheduling policy to this page runtime.
func (*Runtime) UpdateLocation ¶ added in v0.9.0
UpdateLocation はsame-document Navigation後のURLをWebGo APIへ反映する。