window

package module
v0.0.0-...-4bc580b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2022 License: BSD-3-Clause Imports: 1 Imported by: 0

README

Window

Documentation

Index

Constants

This section is empty.

Variables

View Source
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) AsValue

func (c ConsoleObject) AsValue() Value

Get the native value

func (ConsoleObject) Assert

func (c ConsoleObject) Assert(data ...interface{})

Writes an error message to the console if a assertion is false

func (ConsoleObject) Clear

func (c ConsoleObject) Clear()

Clears the console

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

type HistoryObject js.Value

func (HistoryObject) AsValue

func (h HistoryObject) AsValue()

Get the native value

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL