action

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: May 19, 2020 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//BlockMessage is the message showed in waiting time
	BlockMessage = "<h2>Please, wait...</h2>"
)

Functions

func AddClass added in v0.1.3

func AddClass(ws *WebSocket, target, class string) error

AddClass add a class for an element

func Alert

func Alert(ws *WebSocket, message string) error

Alert show alert message in browser

func Append added in v0.1.3

func Append(ws *WebSocket, target, content string) error

Append concate content at target

func BlockUI

func BlockUI(ws *WebSocket)

BlockUI block page interaction

func Disable

func Disable(ws *WebSocket, target string) error

Disable the target form field or button.

func Enable

func Enable(ws *WebSocket, target string) error

Enable the target form field or button.

func Exec

func Exec(ws *WebSocket, js string) error

Exec execute the js code on WebBrowser

func Get

func Get(ws *WebSocket, target string) (string, error)

Get content of form element

func HTML

func HTML(ws *WebSocket, target, content string) error

HTML replace target with new content

func Hide

func Hide(ws *WebSocket, target string, duration string) error

Hide the target

func Prepend added in v0.1.3

func Prepend(ws *WebSocket, target, content string) error

Prepend concate content at the begin of target

func Redirect

func Redirect(ws *WebSocket, url string) error

Redirect to url

func Remove

func Remove(ws *WebSocket, target string) error

Remove target from the DOM

func RemoveClass added in v0.1.3

func RemoveClass(ws *WebSocket, target, class string) error

RemoveClass add a class for an element

func Replace

func Replace(ws *WebSocket, target, content string) error

Replace target with new content

func SendEvent

func SendEvent(ws *WebSocket, event string) error

SendEvent send an event to server

func Set

func Set(ws *WebSocket, target, value string) error

Set update a form element (textbox, dropdown, checkbox, etc) to set text value of TargetID.

func Show

func Show(ws *WebSocket, target string, duration string) error

Show the target

func UnblockUI

func UnblockUI(ws *WebSocket)

UnblockUI block page interaction

func Wire

func Wire(ws *WebSocket, target, event, act string) error

Wire bind an action to an event on target

Types

type WebSocket added in v0.1.4

type WebSocket struct {
	WS    *websocket.Conn
	Mutex sync.Mutex
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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