chrome

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const CurrentWindow = WindowID(0)

Variables

This section is empty.

Functions

This section is empty.

Types

type AllBookmarks

type AllBookmarks interface {
	GetTree() []BookmarkNode
}

func Bookmarks

func Bookmarks() AllBookmarks

type AllTabs

type AllTabs interface {
	js.Wrapper
	GetCurrent() Tab
	GetSelected(window WindowID) Tab
	GetAllInWindow(window WindowID) []Tab
	Create(url string, opt *TabOptions) Tab
}

func Tabs

func Tabs() AllTabs

type BookmarkNode

type BookmarkNode interface {
	js.Wrapper
	ID() string
	ParentID() string
	Index() int
	URL() string
	Title() string
	Children() []BookmarkNode
}

type Tab

type Tab interface {
	js.Wrapper
	ID() int
	Active() bool
	Incognito() bool
	Highlighted() bool
	Pinned() bool
	Selected() bool
	Index() int
	WindowID() int
	URL() string
	Title() string
	Size() (w, h int)

	ExecuteFile(path string) (js.Value, error)
	ExecuteCode(code string) (js.Value, error)
}

func AsTab

func AsTab(v js.Value) Tab

type TabOptions

type TabOptions struct {
	Active bool
}

type WindowID

type WindowID int

Directories

Path Synopsis
Package native provides an API for Native Messaging for Chrome extensions.
Package native provides an API for Native Messaging for Chrome extensions.

Jump to

Keyboard shortcuts

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