client

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: MIT Imports: 8 Imported by: 0

README

client

create a web client

client plugin for web client framework by https://github.com/webview/webview_go

create project and init client project

go install apigo.cc/apigo/ag@latest
mkdir demo && cd demo
ag init client

edit main.js
import client from 'apigo.cc/apigo/client'

let w = client.new('Hello', 800, 500)
w.loadFile('www/index.html')
w.run()
tidy & run

ag tidy
ag run

build

CGO_ENABLED=1 go build -o demo *.go

build on windows

CGO_ENABLED=1 go build -o demo.exe -ldflags '-H windowsgui' *.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bind

func Bind(name string, fn interface{})

func Unbind

func Unbind(name string)

Types

type Webview

type Webview struct {
	// contains filtered or unexported fields
}

func (*Webview) Close

func (w *Webview) Close()

func (*Webview) Dispatch

func (w *Webview) Dispatch(f func())

func (*Webview) Eval

func (w *Webview) Eval(code string)

func (*Webview) LoadFile

func (w *Webview) LoadFile(file string)

func (*Webview) LoadURL

func (w *Webview) LoadURL(url string)

func (*Webview) Run

func (w *Webview) Run()

func (*Webview) SetHtml

func (w *Webview) SetHtml(html string)

func (*Webview) SetSize

func (w *Webview) SetSize(width int, height int, sizeMode *string)

func (*Webview) SetTitle

func (w *Webview) SetTitle(title string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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