Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InjectMultipleTo ¶
InjectMultipleTo injects one or more console methods to a global object of a context.
Implementing the Console interface will not work in this case.
Types ¶
type Console ¶
type Console interface {
GetLogFunctionCallback() v8go.FunctionCallback
}
Console is a single console *method*.
This can hardly be called a console, the name is kept for backwords compatability.
func NewConsole ¶
NewConsole creates a new console method.
InjectTo() calls this under the hood, so its best to use that instead if you only want console.log to be available, otherwise use InjectMultipleTo().
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithMethodName ¶
WithMethodName sets the method name for this console method. Default "log".
func WithOutput ¶
WithOutput sets the output for this console method. Default os.Stdout.
Click to show internal directories.
Click to hide internal directories.