Documentation ¶
Index ¶
- Variables
- type ConsoleObject
- func (c ConsoleObject) AsValue() Value
- func (c ConsoleObject) Assert(data ...interface{})
- func (c ConsoleObject) Clear()
- func (c ConsoleObject) Count(label ...interface{})
- func (c ConsoleObject) Error(data ...interface{})
- func (c ConsoleObject) Group(label ...interface{})
- func (c ConsoleObject) GroupCollapsed(label ...interface{})
- func (c ConsoleObject) GroupEnd(label ...interface{})
- func (c ConsoleObject) Info(data ...interface{})
- func (c ConsoleObject) Log(data ...interface{})
- func (c ConsoleObject) Table(tabularData interface{}, props ...interface{})
- func (c ConsoleObject) Time(label ...interface{})
- func (c ConsoleObject) TimeEnd(label ...interface{})
- func (c ConsoleObject) Trace(label ...interface{})
- func (c ConsoleObject) Warn(data ...interface{})
- type HistoryObject
Constants ¶
This section is empty.
Variables ¶
var ( // Returns a boolean true if a window is closed. Closed = w.Get("closed").Bool() // Returns the Console Object for the window. // See also https://www.w3schools.com/jsref/obj_console.asp Console = ConsoleObject(w.Get("console")) // Returns the Document object for the window. // See also https://www.w3schools.com/jsref/dom_obj_document.asp Document = w.Get("document") // Returns the frame in which the window runs. FrameElement = w.Get("frameElement") // Returns all window objects running in the window. Frames = w.Get("frames") // Returns the History object for the window. // See also https://www.w3schools.com/jsref/obj_history.asp History = HistoryObject(w.Get("history")) )
Functions ¶
This section is empty.
Types ¶
type ConsoleObject ¶
type ConsoleObject Value
func (ConsoleObject) Assert ¶
func (c ConsoleObject) Assert(data ...interface{})
Writes an error message to the console if a assertion is false
func (ConsoleObject) Count ¶
func (c ConsoleObject) Count(label ...interface{})
Logs the number of times that this particular call to count() has been called
func (ConsoleObject) Error ¶
func (c ConsoleObject) Error(data ...interface{})
Outputs an error message to the console
func (ConsoleObject) Group ¶
func (c ConsoleObject) Group(label ...interface{})
Creates a new inline group in the console. This indents following console messages by an additional level, until window.Console.GroupEnd() is called
func (ConsoleObject) GroupCollapsed ¶
func (c ConsoleObject) GroupCollapsed(label ...interface{})
Creates a new inline group in the console. However, the new group is created collapsed. The user will need to use the disclosure button to expand it
func (ConsoleObject) GroupEnd ¶
func (c ConsoleObject) GroupEnd(label ...interface{})
Exits the current inline group in the console
func (ConsoleObject) Info ¶
func (c ConsoleObject) Info(data ...interface{})
Outputs an informational message to the console
func (ConsoleObject) Log ¶
func (c ConsoleObject) Log(data ...interface{})
Outputs a message to the console
func (ConsoleObject) Table ¶
func (c ConsoleObject) Table(tabularData interface{}, props ...interface{})
Displays tabular data as a table
func (ConsoleObject) Time ¶
func (c ConsoleObject) Time(label ...interface{})
Starts a timer (can track how long an operation takes)
func (ConsoleObject) TimeEnd ¶
func (c ConsoleObject) TimeEnd(label ...interface{})
Stops a timer that was previously started by window.Console.Time()
func (ConsoleObject) Trace ¶
func (c ConsoleObject) Trace(label ...interface{})
Outputs a stack trace to the console
func (ConsoleObject) Warn ¶
func (c ConsoleObject) Warn(data ...interface{})
Outputs a warning message to the console
type HistoryObject ¶
func (HistoryObject) Back ¶
func (h HistoryObject) Back()
Loads the previous URL (page) in the history list
func (HistoryObject) Forward ¶
func (h HistoryObject) Forward()
Loads the next URL (page) in the history list
func (HistoryObject) Go ¶
func (h HistoryObject) Go(number int)
Loads a specific URL (page) from the history list
func (HistoryObject) Length ¶
func (h HistoryObject) Length() int
Returns the number of URLs (pages) in the history list