Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResponseHandler ¶
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker is a wrapper around a webworker.
This is run from the page to manage a webworker being run in the background.
func NewForCode ¶
NewForCode creates a new webworker that runs the given JS code.
WARNING: This is not safe to do normally since it is an injection sink. Here it is fine because we're running on a secure host, gopherjs.github.io. Just promise not to do this in any other location without first understanding the security concerns.
func (*Worker) SetResponseHandler ¶
func (w *Worker) SetResponseHandler(msgType string, handler ResponseHandler)
Click to show internal directories.
Click to hide internal directories.