Documentation ¶
Overview ¶
Package app is a package to build progressive web apps (PWA) with Go programming language and WebAssembly. It uses a declarative syntax that allows creating and dealing with HTML elements only by using Go, and without writing any HTML markup. The package also provides an http.Handler ready to serve all the required resources to run Go-based progressive web apps.
Index ¶
- Constants
- Variables
- func Broadcast(s *State)
- func CopyBytesToGo(dst []byte, src Value) int
- func CopyBytesToJS(dst Value, src []byte) int
- func Encrypt(s *State)
- func GenerateStaticWebsite(dir string, h *Handler, pages ...string) error
- func Getenv(k string) string
- func HTMLString(ui UI) string
- func HTMLStringWithIndent(ui UI) string
- func Handle(actionName string, h ActionHandler)
- func KeepBodyClean() (close func())
- func Log(v ...interface{})
- func Logf(format string, v ...interface{})
- func Persist(s *State)
- func PrintHTML(w io.Writer, ui UI)
- func PrintHTMLWithIndent(w io.Writer, ui UI)
- func Route(path string, c Composer)
- func RouteWithRegexp(pattern string, c Composer)
- func RunWhenOnBrowser()
- func TestMatch(tree UI, d TestUIDescriptor) error
- func TestPath(p ...int) []int
- type Action
- type ActionHandler
- type AppInstaller
- type AppUpdater
- type BrowserStorage
- type BrowserWindow
- type ClientDispatcher
- type Compo
- type Composer
- type Condition
- type Context
- type Dismounter
- type Dispatch
- type DispatchMode
- type Dispatcher
- type Environment
- type Event
- type EventHandler
- type Func
- type HTMLA
- type HTMLAbbr
- type HTMLAddress
- type HTMLArea
- type HTMLArticle
- type HTMLAside
- type HTMLAudio
- type HTMLB
- type HTMLBase
- type HTMLBdi
- type HTMLBdo
- type HTMLBlockquote
- type HTMLBody
- type HTMLBr
- type HTMLButton
- type HTMLCanvas
- type HTMLCaption
- type HTMLCite
- type HTMLCode
- type HTMLCol
- type HTMLColGroup
- type HTMLData
- type HTMLDataList
- type HTMLDd
- type HTMLDel
- type HTMLDetails
- type HTMLDfn
- type HTMLDialog
- type HTMLDiv
- type HTMLDl
- type HTMLDt
- type HTMLEm
- type HTMLEmbed
- type HTMLFieldSet
- type HTMLFigCaption
- type HTMLFigure
- type HTMLFooter
- type HTMLForm
- type HTMLH1
- type HTMLH2
- type HTMLH3
- type HTMLH4
- type HTMLH5
- type HTMLH6
- type HTMLHead
- type HTMLHeader
- type HTMLHr
- type HTMLHtml
- type HTMLI
- type HTMLIFrame
- type HTMLImg
- type HTMLInput
- type HTMLIns
- type HTMLKbd
- type HTMLLabel
- type HTMLLegend
- type HTMLLi
- type HTMLLink
- type HTMLMain
- type HTMLMap
- type HTMLMark
- type HTMLMeta
- type HTMLMeter
- type HTMLNav
- type HTMLNoScript
- type HTMLObject
- type HTMLOl
- type HTMLOptGroup
- type HTMLOption
- type HTMLOutput
- type HTMLP
- type HTMLParam
- type HTMLPicture
- type HTMLPre
- type HTMLProgress
- type HTMLQ
- type HTMLRp
- type HTMLRt
- type HTMLRuby
- type HTMLS
- type HTMLSamp
- type HTMLScript
- type HTMLSection
- type HTMLSelect
- type HTMLSmall
- type HTMLSource
- type HTMLSpan
- type HTMLStrong
- type HTMLStyle
- type HTMLSub
- type HTMLSummary
- type HTMLSup
- type HTMLTBody
- type HTMLTHead
- type HTMLTable
- type HTMLTd
- type HTMLTemplate
- type HTMLTextarea
- type HTMLTfoot
- type HTMLTh
- type HTMLTime
- type HTMLTitle
- type HTMLTr
- type HTMLU
- type HTMLUl
- type HTMLVar
- type HTMLVideo
- type HTMLWbr
- type Handler
- type Icon
- type Kind
- type Mounter
- type MsgHandler
- type Navigator
- type Observer
- type Page
- type PreRenderCache
- type PreRenderedItem
- type PreRenderer
- type ProxyResource
- type RangeLoop
- type Resizer
- type ResourceProvider
- type ServerDispatcher
- type State
- type StateOption
- type Tag
- type Tagger
- type Tags
- type TestUIDescriptor
- type Type
- type UI
- type Updater
- type Value
- type Wrapper
Constants ¶
const ( // IsClient reports whether the code is running as a client in the // WebAssembly binary (app.wasm). IsClient = runtime.GOARCH == "wasm" && runtime.GOOS == "js" // IsServer reports whether the code is running on a server for // pre-rendering purposes. IsServer = runtime.GOARCH != "wasm" || runtime.GOOS != "js" )
Variables ¶
var ( // DefaultLogger is the logger used to log info and errors. DefaultLogger func(format string, v ...interface{}) )
Functions ¶
func Broadcast ¶
func Broadcast(s *State)
Broadcast is a state option that broadcasts a state to other browser tabs and windows from the same origin.
func CopyBytesToGo ¶
CopyBytesToGo copies bytes from the Uint8Array src to dst. It returns the number of bytes copied, which will be the minimum of the lengths of src and dst.
CopyBytesToGo panics if src is not an Uint8Array.
func CopyBytesToJS ¶
CopyBytesToJS copies bytes from src to the Uint8Array dst. It returns the number of bytes copied, which will be the minimum of the lengths of src and dst.
CopyBytesToJS panics if dst is not an Uint8Array.
func Encrypt ¶
func Encrypt(s *State)
Encrypt is a state option that encrypts a state before persisting it in local storage. Encryption is performed only when the Persist option is also set.
func GenerateStaticWebsite ¶
GenerateStaticWebsite generates the files to run a PWA built with go-app as a static website in the specified directory. Static websites can be used with hosts such as Github Pages.
Note that app.wasm must still be built separately and put into the web directory.
func Getenv ¶
Getenv retrieves the value of the environment variable named by the key. It returns the value, which will be empty if the variable is not present.
func HTMLString ¶
HTMLString return an HTML string representation of the given UI element.
func HTMLStringWithIndent ¶
HTMLStringWithIndent return an indented HTML string representation of the given UI element.
func Handle ¶
func Handle(actionName string, h ActionHandler)
Handle registers the handler for the given action name. When an action occurs, the handler is executed on its own goroutine.
func KeepBodyClean ¶
func KeepBodyClean() (close func())
KeepBodyClean prevents third-party Javascript libraries to add nodes to the body element.
func Log ¶
func Log(v ...interface{})
Log logs using the default formats for its operands. Spaces are always added between operands.
func Persist ¶
func Persist(s *State)
Persist is a state option that persists a state in local storage.
Be mindful to not use this option as a cache since local storage is limited to 5MB in a lot of web browsers.
func PrintHTMLWithIndent ¶
PrintHTMLWithIndent writes an idented HTML representation of the UI element into the given writer.
func Route ¶
Route associates the type of the given component to the given path.
When a page is requested and matches the route, a new instance of the given component is created before being displayed.
func RouteWithRegexp ¶
RouteWithRegexp associates the type of the given component to the given regular expression pattern.
Patterns use the Go standard regexp format.
When a page is requested and matches the pattern, a new instance of the given component is created before being displayed.
func RunWhenOnBrowser ¶
func RunWhenOnBrowser()
RunWhenOnBrowser starts the app, displaying the component associated with the current URL path.
This call is skipped when the program is not run on a web browser. This allows writing client and server-side code without separation or pre-compilation flags.
Eg:
func main() { // Define app routes. app.Route("/", myComponent{}) app.Route("/other-page", myOtherComponent{}) // Run the application when on a web browser (only executed on client side). app.RunWhenOnBrowser() // Launch the server that serves the app (only executed on server side): http.Handle("/", &app.Handler{Name: "My app"}) http.ListenAndServe(":8080", nil) }
func TestMatch ¶
func TestMatch(tree UI, d TestUIDescriptor) error
TestMatch looks for the element targeted by the descriptor in the given tree and reports whether it matches with the expected element.
Eg:
tree := app.Div().Body( app.H2().Body( app.Text("foo"), ), app.P().Body( app.Text("bar"), ), ) // Testing root: err := app.TestMatch(tree, app.TestUIDescriptor{ Path: TestPath(), Expected: app.Div(), }) // OK => err == nil // Testing h2: err := app.TestMatch(tree, app.TestUIDescriptor{ Path: TestPath(0), Expected: app.H3(), }) // KO => err != nil because we ask h2 to match with h3 // Testing text from p: err = app.TestMatch(tree, app.TestUIDescriptor{ Path: TestPath(1, 0), Expected: app.Text("bar"), }) // OK => err == nil
Types ¶
type ActionHandler ¶
ActionHandler represents a handler that is executed when an action is created with Context.NewAction().
type AppInstaller ¶
type AppInstaller interface { // The function called when the application becomes installable or // installed. Use Context.IsAppInstallable() or Context.IsAppInstalled to // check the install state. OnAppInstallChange is always called on the UI // goroutine. OnAppInstallChange(Context) }
AppInstaller is the interface that describes a component that is notified when the application installation state changes.
type AppUpdater ¶
type AppUpdater interface { // The function called when the application is updated. It is always called // on the UI goroutine. OnAppUpdate(Context) }
AppUpdater is the interface that describes a component that is notified when the application is updated.
type BrowserStorage ¶
type BrowserStorage interface { // Set sets the value to the given key. The value must be json convertible. Set(k string, v interface{}) error // Get gets the item associated to the given key and store it in the given // value. // It returns an error if v is not a pointer.  Del(k string) // Len returns the number of items stored. Len() int // Key returns the key of the item associated to the given index. Key(i int) (string, error) // Clear deletes all items. Clear() }
BrowserStorage is the interface that describes a web browser storage.
type BrowserWindow ¶
type BrowserWindow interface { Value // The window current url (window.location.href). URL() *url.URL // The window size. Size() (w, h int) // The position of the cursor (mouse or touch). CursorPosition() (x, y int) // Returns the HTML element with the id property that matches the given id. GetElementByID(id string) Value // Scrolls to the HTML element with the given id. ScrollToID(id string) // AddEventListener subscribes a given handler to the specified event. It // returns a function that must be called to unsubscribe the handler and // release allocated resources. AddEventListener(event string, h EventHandler) func() // contains filtered or unexported methods }
BrowserWindow is the interface that describes the browser window.
type ClientDispatcher ¶
type ClientDispatcher interface { Dispatcher // Consume executes all the remaining UI instructions. Consume() // ConsumeNext executes the next UI instructions. ConsumeNext() // Close consumes all the remaining UI instruction and releases allocated // resources. Close() // Mounts the given component as root element. Mount(UI) Nav(*url.URL) // Triggers OnAppUpdate from the root component. AppUpdate() // Triggers OnAppInstallChange from the root component. AppInstallChange() // Triggers OnAppResize from the root component. AppResize() }
ClientDispatcher is the interface that describes a dispatcher that emulates a client environment.
func NewClientTester ¶
func NewClientTester(n UI) ClientDispatcher
NewClientTester creates a testing dispatcher that simulates a client environment. The given UI element is mounted upon creation.
type Compo ¶
type Compo struct {
// contains filtered or unexported fields
}
Compo represents the base struct to use in order to build a component.
func (*Compo) Render ¶
Render describes the component content. This is a default implementation to satisfy the app.Composer interface. It should be redefined when app.Compo is embedded.
func (*Compo) ResizeContent ¶
func (c *Compo) ResizeContent()
ResizeContent triggers OnResize() on all the component children that implement the Resizer interface.
func (*Compo) Update ¶
func (c *Compo) Update()
Update triggers a component appearance update. It should be called when a field used to render the component has been modified. Updates are always performed on the UI goroutine.
func (*Compo) ValueTo ¶
func (c *Compo) ValueTo(v interface{}) EventHandler
ValueTo stores the value of the DOM element (if exists) that emitted an event into the given value.
The given value must be a pointer to a signed integer, unsigned integer, or a float.
It panics if the given value is not a pointer.
type Composer ¶
type Composer interface { UI // Render returns the node tree that define how the component is desplayed. Render() UI // Update update the component appearance. It should be called when a field // used to render the component has been modified. Update() // ResizeContent triggers OnResize() on all the component children that // implement the Resizer interface. ResizeContent() // ValueTo stores the value of the DOM element (if exists) that emitted an // event into the given value. // // The given value must be a pointer to a signed integer, unsigned integer, // or a float. // // It panics if the given value is not a pointer. ValueTo(interface{}) EventHandler // contains filtered or unexported methods }
Composer is the interface that describes a customized, independent and reusable UI element.
Satisfying this interface is done by embedding app.Compo into a struct and implementing the Render function.
Example:
type Hello struct { app.Compo } func (c *Hello) Render() app.UI { return app.Text("hello") }
type Condition ¶
type Condition interface { UI // ElseIf sets the condition with the given nodes if previous expressions // were not met and given expression is true. ElseIf(expr bool, elems ...UI) Condition // Else sets the condition with the given UI elements if previous // expressions were not met. Else(elems ...UI) Condition }
Condition represents a control structure that displays nodes depending on a given expression.
type Context ¶
type Context interface { context.Context // Returns the UI element tied to the context. Src() UI // Returns the associated JavaScript value. The is an helper method for: // ctx.Src.JSValue() JSSrc() Value // Reports whether the app has been updated in background. Use app.Reload() // to load the updated version. AppUpdateAvailable() bool // Reports whether the app is installable. IsAppInstallable() bool // Shows the app install prompt if the app is installable. ShowAppInstallPrompt() // Returns the current page. Page() Page // Executes the given function on the UI goroutine and notifies the // context's nearest component to update its state. Dispatch(fn func(Context)) // Executes the given function on the UI goroutine after notifying the // context's nearest component to update its state. Defer(fn func(Context)) // Registers the handler for the given action name. When an action occurs, // the handler is executed on the UI goroutine. Handle(actionName string, h ActionHandler) // Creates an action with optional tags, to be handled with Context.Handle.  Eg: // ctx.NewActionWithValue("processValue", 42) // ctx.NewActionWithValue("processValue", 42, app.T("type", "number")) // ctx.NewActionWithValue("myAction", 42, app.Tags{ // "foo": "bar", // "hello": "world", // }) NewActionWithValue(name string, v interface{}, tags ...Tagger) // Executes the given function on a new goroutine. // // The difference versus just launching a goroutine is that it ensures that // the asynchronous function is called before a page is fully pre-rendered // and served over HTTP. Async(fn func()) // Asynchronously waits for the given duration and dispatches the given // function. After(d time.Duration, fn func(Context)) // Executes the given function and notifies the parent components to update // their state. It should be used to launch component custom event handlers. Emit(fn func()) // Reloads the WebAssembly app to the current page. It is like refreshing // the browser page. Reload() // an *url.URL and then calls ctx.NavigateTo under the hood. Navigate(url string) NavigateTo(u *url.URL) // Resolves the given path to make it point to the right location whether // static resources are located on a local directory or a remote bucket. ResolveStaticResource(string) string // Returns a storage that uses the browser local storage associated to the // document origin. Data stored has no expiration time. LocalStorage() BrowserStorage // Returns a storage that uses the browser session storage associated to the // document origin. Data stored expire when the page session ends. SessionStorage() BrowserStorage // Scrolls to the HTML element with the given id. ScrollTo(id string) // Returns a UUID that identifies the app on the current device. DeviceID() string // Encrypts the given value using AES encryption. Encrypt(v interface{}) ([]byte, error) // Decrypts the given encrypted bytes and stores them in the given value. Decrypt(crypted []byte, v interface{}) error // Sets the state with the given value. // Example: // ctx.SetState("/globalNumber", 42, Persistent) // // Options can be added to persist a state into the local storage, encrypt, // expire, or broadcast the state across browser tabs and windows. // Example: // ctx.SetState("/globalNumber", 42, Persistent, Broadcast) SetState(state string, v interface{}, opts ...StateOption) // Stores the specified state value into the given receiver. Panics when the // receiver is not a pointer or nil. GetState(state string, recv interface{}) // Deletes the given state. All value observations are stopped. DelState(state string) // Creates an observer that observes changes for the given state. // Example: // type myComponent struct { // app.Compo // // number int // } // // func (c *myComponent) OnMount(ctx app.Context) { // ctx.ObserveState("/globalNumber").Value(&c.number) // } ObserveState(state string) Observer // Returns the app dispatcher. Dispatcher() Dispatcher }
Context is the interface that describes a context tied to a UI element.
A context provides mechanisms to deal with the browser, the current page, navigation, concurrency, and component communication.
It is canceled when its associated UI element is dismounted.
type Dismounter ¶
type Dismounter interface { Composer // The function called when the component is dismounted. It is always called // on the UI goroutine. OnDismount() }
Dismounter is the interface that describes a component that can perform additional actions when dismounted.
type Dispatch ¶
type Dispatch struct { Mode DispatchMode Source UI Function func(Context) }
Dispatch represents an operation executed on the UI goroutine.
type DispatchMode ¶
type DispatchMode int
DispatchMode represents how a dispatch is processed.
const ( // A dispatch mode where the dispatched operation is enqueued to be executed // as soon as possible and its associated UI element is updated at the end // of the current update cycle. Update DispatchMode = iota // A dispatch mode that schedules the dispatched operation to be executed // after the current update frame. Defer // A dispatch mode where the dispatched operation is enqueued to be executed // as soon as possible. Next )
type Dispatcher ¶
type Dispatcher interface { // Context returns the context associated with the root element. Context() Context // Executes the given dispatch operation on the UI goroutine. Dispatch(d Dispatch) // Emit executes the given function and notifies the source's parent // components to update their state. Emit(src UI, fn func()) // Handle registers the handler for the given action name. When an action // occurs, the handler is executed on the UI goroutine. Handle(actionName string, src UI, h ActionHandler) // Post posts the given action. The action is then handled by handlers // registered with Handle() and Context.Handle(). Post(a Action) // Sets the state with the given value. SetState(state string, v interface{}, opts ...StateOption) // Stores the specified state value into the given receiver. Panics when the // receiver is not a pointer or nil. GetState(state string, recv interface{}) // Deletes the given state. DelState(state string) // Creates an observer that observes changes for the specified state while // the given element is mounted. ObserveState(state string, elem UI) Observer // Async launches the given function on a new goroutine. // // The difference versus just launching a goroutine is that it ensures that // the asynchronous instructions are called before the dispatcher is closed. // // This is important during component prerendering since asynchronous // operations need to complete before sending a pre-rendered page over HTTP. Async(fn func()) // Wait waits for the asynchronous operations launched with Async() to // complete. Wait() // contains filtered or unexported methods }
Dispatcher is the interface that describes an environment that synchronizes UI instructions and UI elements lifecycle.
type Environment ¶
Environment describes the environment variables to pass to the progressive web app.
type Event ¶
type Event struct {
Value
}
Event is the interface that describes a javascript event.
func (Event) PreventDefault ¶
func (e Event) PreventDefault()
PreventDefault cancels the event if it is cancelable. The default action that belongs to the event will not occur.
type EventHandler ¶
EventHandler represents a function that can handle HTML events. They are always called on the UI goroutine.
type Func ¶
type Func interface { Value // Release frees up resources allocated for the function. The function must // not be invoked after calling Release. Release() }
Func is the interface that describes a wrapped Go function to be called by JavaScript.
func FuncOf ¶
FuncOf returns a wrapped function.
Invoking the JavaScript function will synchronously call the Go function fn with the value of JavaScript's "this" keyword and the arguments of the invocation. The return value of the invocation is the result of the Go function mapped back to JavaScript according to ValueOf.
A wrapped function triggered during a call from Go to JavaScript gets executed on the same goroutine. A wrapped function triggered by JavaScript's event loop gets executed on an extra goroutine. Blocking operations in the wrapped function will block the event loop. As a consequence, if one wrapped function blocks, other wrapped funcs will not be processed. A blocking function should therefore explicitly start a new goroutine.
Func.Release must be called to free up resources when the function will not be used any more.
type HTMLA ¶
type HTMLA interface { UI // Body set the content of the element. Body(elems ...UI) HTMLA // Text sets the content of the element with a text node containing the stringified given value. Text(v interface{}) HTMLA // AccessKey specifies a shortcut key to activate/focus an element. AccessKey(v string) HTMLA // Aria stores accessible rich internet applications (ARIA) data. Aria(k string, v interface{}) HTMLA // Class specifies one or more classnames for an element (refers to a class in a style sheet). Multiple classnames are space separated. Class(v string) HTMLA // ContentEditable specifies whether the content of an element is editable or not. ContentEditable(v bool) HTMLA // DataSet stores custom data private to the page or application. DataSet(k string, v interface{}) HTMLA // Dir specifies the text direction for the content in an element. Dir(v string) HTMLA // Download specifies that the target will be downloaded when a user clicks on the hyperlink. Download(v string) HTMLA // Draggable specifies whether an element is draggable or not. Draggable(v bool) HTMLA // Hidden specifies that an element is not yet, or is no longer relevant. Hidden(v bool) HTMLA // Href specifies the URL of the page the link goes to. Href(v string) HTMLA // HrefLang specifies the language of the linked document. HrefLang(v string) HTMLA // ID specifies a unique id for an element. ID(v string) HTMLA // Lang specifies the language of the element's content. Lang(v string) HTMLA // Media specifies what media/device the linked document is optimized for. Media(v string) HTMLA // Ping specifies a list of URLs to be notified if the user follows the hyperlink. Ping(v string) HTMLA // Rel specifies the relationship between the current document and the linked document. Rel(v string) HTMLA // Spellcheck specifies whether the element is to have its spelling and grammar checked or not. Spellcheck(v bool) HTMLA // Style specifies a CSS style for an element. Can be called multiple times to set multiple css styles. Style(k, v string) HTMLA // TabIndex specifies the tabbing order of an element. TabIndex(v int) HTMLA // Target specifies the target for where to open the linked document or where to submit the form. Target(v string) HTMLA // Title specifies extra information about an element. Title(v string) HTMLA // Type specifies the type of element. Type(v string) HTMLA // OnBlur calls the given handler when the element loses focus. OnBlur(h EventHandler, scope ...interface{}) HTMLA // OnChange calls the given handler when the value of the element is changed. OnChange(h EventHandler, scope ...interface{}) HTMLA // OnClick calls the given handler when there is a mouse click on the element. OnClick(h EventHandler, scope ...interface{}) HTMLA // OnContextMenu calls the given handler when a context menu is triggered. OnContextMenu(h EventHandler, scope ...interface{}) HTMLA // OnCopy calls the given handler when the user copies the content of an element. OnCopy(h EventHandler, scope ...interface{}) HTMLA // OnCut calls the given handler when the user cuts the content of an element. OnCut(h EventHandler, scope ...interface{}) HTMLA // OnDblClick calls the given handler when there is a mouse double-click on the element. OnDblClick(h EventHandler, scope ...interface{}) HTMLA // OnDrag calls the given handler when an element is dragged. OnDrag(h EventHandler, scope ...interface{}) HTMLA // OnDragEnd calls the given handler at the end of a drag operation. OnDragEnd(h EventHandler, scope ...interface{}) HTMLA // OnDragEnter calls the given handler when an element has been dragged to a valid drop target. OnDragEnter(h EventHandler, scope ...interface{}) HTMLA // OnDragLeave calls the given handler when an element leaves a valid drop target. OnDragLeave(h EventHandler, scope ...interface{}) HTMLA // OnDragOver calls the given handler when an element is being dragged over a valid drop target. OnDragOver(h EventHandler, scope ...interface{}) HTMLA // OnDragStart calls the given handler at the start of a drag operation. OnDragStart(h EventHandler, scope ...interface{}) HTMLA // OnDrop calls the given handler when dragged element is being dropped. OnDrop(h EventHandler, scope ...interface{}) HTMLA // OnFocus calls the given handler when the element gets focus. OnFocus(h EventHandler, scope ...interface{}) HTMLA // OnInput calls the given handler when an element gets user input. OnInput(h EventHandler, scope ...interface{}) HTMLA // OnInvalid calls the given handler when an element is invalid. OnInvalid(h EventHandler, scope ...interface{}) HTMLA // OnKeyDown calls the given handler when a user is pressing a key. OnKeyDown(h EventHandler, scope ...interface{}) HTMLA // OnKeyPress calls the given handler when a user presses a key. OnKeyPress(h EventHandler, scope ...interface{}) HTMLA // OnKeyup calls the given handler when a user releases a key. OnKeyup(h EventHandler, scope ...interface{}) HTMLA // OnMouseDown calls the given handler when a mouse button is pressed down on an element. OnMouseDown(h EventHandler, scope ...interface{}) HTMLA // OnMouseMove calls the given handler when the mouse pointer is moving while it is over an element. OnMouseMove(h EventHandler, scope ...interface{}) HTMLA // OnMouseOut calls the given handler when the mouse pointer moves out of an element. OnMouseOut(h EventHandler, scope ...interface{}) HTMLA // OnMouseOver calls the given handler when the mouse pointer moves over an element. OnMouseOver(h EventHandler, scope ...interface{}) HTMLA // OnMouseUp calls the given handler when a mouse button is released over an element. OnMouseUp(h EventHandler, scope ...interface{}) HTMLA // OnPaste calls the given handler when the user pastes some content in an element. OnPaste(h EventHandler, scope ...interface{}) HTMLA // OnReset calls the given handler when the Reset button in a form is clicked. OnReset(h EventHandler, scope ...interface{}) HTMLA // OnScroll calls the given handler when an element's scrollbar is being scrolled. OnScroll(h EventHandler, scope ...interface{}) HTMLA // OnSearch calls the given handler when the user writes something in a search field. OnSearch(h EventHandler, scope ...interface{}) HTMLA // OnSelect calls the given handler after some text has been selected in an element. OnSelect(h EventHandler, scope ...interface{}) HTMLA // OnSubmit calls the given handler when a form is submitted. OnSubmit(h EventHandler, scope ...interface{}) HTMLA // OnWheel calls the given handler when the mouse wheel rolls up or down over an element. OnWheel(h EventHandler, scope ...interface{}) HTMLA }
HTMLA is the interface that describes a <a> HTML element.
type HTMLAbbr ¶
type HTMLAbbr interface { UI // Body set the content of the element. Body(elems ...UI) HTMLAbbr // Text sets the content of the element with a text node containing the stringified given value. Text(v interface{}) HTMLAbbr // AccessKey specifies a shortcut key to activate/focus an element. AccessKey(v string) HTMLAbbr // Aria stores accessible rich internet applications (ARIA) data. Aria(k string, v interface{}) HTMLAbbr // Class specifies one or more classnames for an element (refers to a class in a style sheet). Multiple classnames are space separated. Class(v string) HTMLAbbr // ContentEditable specifies whether the content of an element is editable or not. ContentEditable(v bool) HTMLAbbr // DataSet stores custom data private to the page or application. DataSet(k string, v interface{}) HTMLAbbr // Dir specifies the text direction for the content in an element. Dir(v string) HTMLAbbr // Draggable specifies whether an element is draggable or not. Draggable(v bool) HTMLAbbr // Hidden specifies that an element is not yet, or is no longer relevant. Hidden(v bool) HTMLAbbr // ID specifies a unique id for an element. ID(v string) HTMLAbbr // Lang specifies the language of the element's content. Lang(v string) HTMLAbbr // Spellcheck specifies whether the element is to have its spelling and grammar checked or not. Spellcheck(v bool) HTMLAbbr // Style specifies a CSS style for an element. Can be called multiple times to set multiple css styles. Style(k, v string) HTMLAbbr // TabIndex specifies the tabbing order of an element. TabIndex(v int) HTMLAbbr // Title specifies extra information about an element. Title(v string) HTMLAbbr // OnBlur calls the given handler when the element loses focus. OnBlur(h EventHandler, scope ...interface{}) HTMLAbbr // OnChange calls the given handler when the value of the element is changed. OnChange(h EventHandler, scope ...interface{}) HTMLAbbr // OnClick calls the given handler when there is a mouse click on the element. OnClick(h EventHandler, scope ...interface{}) HTMLAbbr // OnContextMenu calls the given handler when a context menu is triggered. OnContextMenu(h EventHandler, scope ...interface{}) HTMLAbbr // OnCopy calls the given handler when the user copies the content of an element. OnCopy(h EventHandler, scope ...interface{}) HTMLAbbr // OnCut calls the given handler when the user cuts the content of an element. OnCut(h EventHandler, scope ...interface{}) HTMLAbbr // OnDblClick calls the given handler when there is a mouse double-click on the element. OnDblClick(h EventHandler, scope ...interface{}) HTMLAbbr // OnDrag calls the given handler when an element is dragged. OnDrag(h EventHandler, scope ...interface{}) HTMLAbbr // OnDragEnd calls the given handler at the end of a drag operation. OnDragEnd(h EventHandler, scope ...interface{}) HTMLAbbr // OnDragEnter calls the given handler when an element has been dragged to a valid drop target. OnDragEnter(h EventHandler, scope ...interface{}) HTMLAbbr // OnDragLeave calls the given handler when an element leaves a valid drop target. OnDragLeave(h EventHandler, scope ...interface{}) HTMLAbbr // OnDragOver calls the given handler when an element is being dragged over a valid drop target. OnDragOver(h EventHandler, scope ...interface{}) HTMLAbbr // OnDragStart calls the given handler at the start of a drag operation. OnDragStart(h EventHandler, scope ...interface{}) HTMLAbbr // OnDrop calls the given handler when dragged element is being dropped. OnDrop(h EventHandler, scope ...interface{}) HTMLAbbr // OnFocus calls the given handler when the element gets focus. OnFocus(h EventHandler, scope ...interface{}) HTMLAbbr // OnInput calls the given handler when an element gets user input. OnInput(h EventHandler, scope ...interface{}) HTMLAbbr // OnInvalid calls the given handler when an element is invalid. OnInvalid(h EventHandler, scope ...interface{}) HTMLAbbr // OnKeyDown calls the given handler when a user is pressing a key. OnKeyDown(h EventHandler, scope ...interface{}) HTMLAbbr // OnKeyPress calls the given handler when a user presses a key. OnKeyPress(h EventHandler, scope ...interface{}) HTMLAbbr // OnKeyup calls the given handler when a user releases a key. OnKeyup(h EventHandler, scope ...interface{}) HTMLAbbr // OnMouseDown calls the given handler when a mouse button is pressed down on an element. OnMouseDown(h EventHandler, scope ...interface{}) HTMLAbbr // OnMouseMove calls the given handler when the mouse pointer is moving while it is over an element. OnMouseMove(h EventHandler, scope ...interface{}) HTMLAbbr // OnMouseOut calls the given handler when the mouse pointer moves out of an element. OnMouseOut(h EventHandler, scope ...interface{}) HTMLAbbr // OnMouseOver calls the given handler when the mouse pointer moves over an element. OnMouseOver(h EventHandler, scope ...interface{}) HTMLAbbr // OnMouseUp calls the given handler when a mouse button is released over an element. OnMouseUp(h EventHandler, scope ...interface{}) HTMLAbbr // OnPaste calls the given handler when the user pastes some content in an element. OnPaste(h EventHandler, scope ...interface{}) HTMLAbbr // OnReset calls the given handler when the Reset button in a form is clicked. OnReset(h EventHandler, scope ...interface{}) HTMLAbbr // OnScroll calls the given handler when an element's scrollbar is being scrolled. OnScroll(h EventHandler, scope ...interface{}) HTMLAbbr // OnSearch calls the given handler when the user writes something in a search field. OnSearch(h EventHandler, scope ...interface{}) HTMLAbbr // OnSelect calls the given handler after some text has been selected in an element. OnSelect(h EventHandler, scope ...interface{}) HTMLAbbr // OnSubmit calls the given handler when a form is submitted. OnSubmit(h EventHandler, scope ...interface{}) HTMLAbbr // OnWheel calls the given handler when the mouse wheel rolls up or down over an element. OnWheel(h EventHandler, scope ...interface{}) HTMLAbbr }
HTMLAbbr is the interface that describes a <abbr> HTML element.
type HTMLAddress ¶
type HTMLAddress interface { UI // Body set the content of the element. Body(elems ...UI) HTMLAddress // Text sets the content of the element with a text node containing the stringified given value. Text(v interface{}) HTMLAddress // AccessKey specifies a shortcut key to activate/focus an element. AccessKey(v string) HTMLAddress // Aria stores accessible rich internet applications (ARIA) data. Aria(k string, v interface{}) HTMLAddress // Class specifies one or more classnames for an element (refers to a class in a style sheet). Multiple classnames are space separated. Class(v string) HTMLAddress // ContentEditable specifies whether the content of an element is editable or not. ContentEditable(v bool) HTMLAddress // DataSet stores custom data private to the page or application. DataSet(k string, v interface{}) HTMLAddress // Dir specifies the text direction for the content in an element. Dir(v string) HTMLAddress // Draggable specifies whether an element is draggable or not. Draggable(v bool) HTMLAddress // Hidden specifies that an element is not yet, or is no longer relevant. Hidden(v bool) HTMLAddress // ID specifies a unique id for an element. ID(v string) HTMLAddress // Lang specifies the language of the element's content. Lang(v string) HTMLAddress // Spellcheck specifies whether the element is to have its spelling and grammar checked or not. Spellcheck(v bool) HTMLAddress // Style specifies a CSS style for an element. Can be called multiple times to set multiple css styles. Style(k, v string) HTMLAddress // TabIndex specifies the tabbing order of an element. TabIndex(v int) HTMLAddress // Title specifies extra information about an element. Title(v string) HTMLAddress // OnBlur calls the given handler when the element loses focus. OnBlur(h EventHandler, scope ...interface{}) HTMLAddress // OnChange calls the given handler when the value of the element is changed. OnChange(h EventHandler, scope ...interface{}) HTMLAddress // OnClick calls the given handler when there is a mouse click on the element. OnClick(h EventHandler, scope ...interface{}) HTMLAddress // OnContextMenu calls the given handler when a context menu is triggered. OnContextMenu(h EventHandler, scope ...interface{}) HTMLAddress // OnCopy calls the given handler when the user copies the content of an element. OnCopy(h EventHandler, scope ...interface{}) HTMLAddress // OnCut calls the given handler when the user cuts the content of an element. OnCut(h EventHandler, scope ...interface{}) HTMLAddress // OnDblClick calls the given handler when there is a mouse double-click on the element. OnDblClick(h EventHandler, scope ...interface{}) HTMLAddress // OnDrag calls the given handler when an element is dragged. OnDrag(h EventHandler, scope ...interface{}) HTMLAddress // OnDragEnd calls the given handler at the end of a drag operation. OnDragEnd(h EventHandler, scope ...interface{}) HTMLAddress // OnDragEnter calls the given handler when an element has been dragged to a valid drop target. OnDragEnter(h EventHandler, scope ...interface{}) HTMLAddress // OnDragLeave calls the given handler when an element leaves a valid drop target. OnDragLeave(h EventHandler, scope ...interface{}) HTMLAddress // OnDragOver calls the given handler when an element is being dragged over a valid drop target. OnDragOver(h EventHandler, scope ...interface{}) HTMLAddress // OnDragStart calls the given handler at the start of a drag operation. OnDragStart(h EventHandler, scope ...interface{}) HTMLAddress // OnDrop calls the given handler when dragged element is being dropped. OnDrop(h EventHandler, scope ...interface{}) HTMLAddress // OnFocus calls the given handler when the element gets focus. OnFocus(h EventHandler, scope ...interface{}) HTMLAddress // OnInput calls the given handler when an element gets user input. OnInput(h EventHandler, scope ...interface{}) HTMLAddress // OnInvalid calls the given handler when an element is invalid. OnInvalid(h EventHandler, scope ...interface{}) HTMLAddress // OnKeyDown calls the given handler when a user is pressing a key. OnKeyDown(h EventHandler, scope ...interface{}) HTMLAddress // OnKeyPress calls the given handler when a user presses a key. OnKeyPress(h EventHandler, scope ...interface{}) HTMLAddress // OnKeyup calls the given handler when a user releases a key. OnKeyup(h EventHandler, scope ...interface{}) HTMLAddress // OnMouseDown calls the given handler when a mouse button is pressed down on an element. OnMouseDown(h EventHandler, scope ...interface{}) HTMLAddress // OnMouseMove calls the given handler when the mouse pointer is moving while it is over an element. OnMouseMove(h EventHandler, scope ...interface{}) HTMLAddress // OnMouseOut calls the given handler when the mouse pointer moves out of an element. OnMouseOut(h EventHandler, scope ...interface{}) HTMLAddress // OnMouseOver calls the given handler when the mouse pointer moves over an element. OnMouseOver(h EventHandler, scope ...interface{}) HTMLAddress // OnMouseUp calls the given handler when a mouse button is released over an element. OnMouseUp(h EventHandler, scope ...interface{}) HTMLAddress // OnPaste calls the given handler when the user pastes some content in an element. OnPaste(h EventHandler, scope ...interface{}) HTMLAddress // OnReset calls the given handler when the Reset button in a form is clicked. OnReset(h EventHandler, scope ...interface{}) HTMLAddress // OnScroll calls the given handler when an element's scrollbar is being scrolled. OnScroll(h EventHandler, scope ...interface{}) HTMLAddress // OnSearch calls the given handler when the user writes something in a search field. OnSearch(h EventHandler, scope ...interface{}) HTMLAddress // OnSelect calls the given handler after some text has been selected in an element. OnSelect(h EventHandler, scope ...interface{}) HTMLAddress // OnSubmit calls the given handler when a form is submitted. OnSubmit(h EventHandler, scope ...interface{}) HTMLAddress // OnWheel calls the given handler when the mouse wheel rolls up or down over an element. OnWheel(h EventHandler, scope ...interface{}) HTMLAddress }
HTMLAddress is the interface that describes a <address> HTML element.
func Address ¶
func Address() HTMLAddress
Address returns an HTML element that defines contact information for the author/owner of a document.
type HTMLArea ¶
type HTMLArea interface { UI // AccessKey specifies a shortcut key to activate/focus an element. AccessKey(v string) HTMLArea // Alt specifies an alternate text when the original element fails to display. Alt(v string) HTMLArea // Aria stores accessible rich internet applications (ARIA) data. Aria(k string, v interface{}) HTMLArea // Class specifies one or more classnames for an element (refers to a class in a style sheet). Multiple classnames are space separated. Class(v string) HTMLArea // ContentEditable specifies whether the content of an element is editable or not. ContentEditable(v bool) HTMLArea // Coords specifies the coordinates of the area. Coords(v string) HTMLArea // DataSet stores custom data private to the page or application. DataSet(k string, v interface{}) HTMLArea // Dir specifies the text direction for the content in an element. Dir(v string) HTMLArea // Download specifies that the target will be downloaded when a user clicks on the hyperlink. Download(v string) HTMLArea // Draggable specifies whether an element is draggable or not. Draggable(v bool) HTMLArea // Hidden specifies that an element is not yet, or is no longer relevant. Hidden(v bool) HTMLArea // Href specifies the URL of the page the link goes to. Href(v string) HTMLArea // HrefLang specifies the language of the linked document. HrefLang(v string) HTMLArea // ID specifies a unique id for an element. ID(v string) HTMLArea // Lang specifies the language of the element's content. Lang(v string) HTMLArea // Media specifies what media/device the linked document is optimized for. Media(v string) HTMLArea // Rel specifies the relationship between the current document and the linked document. Rel(v string) HTMLArea // Shape specifies the shape of the area. Shape(v string) HTMLArea // Spellcheck specifies whether the element is to have its spelling and grammar checked or not. Spellcheck(v bool) HTMLArea // Style specifies a CSS style for an element. Can be called multiple times to set multiple css styles. Style(k, v string) HTMLArea // TabIndex specifies the tabbing order of an element. TabIndex(v int) HTMLArea // Target specifies the target for where to open the linked document or where to submit the form. Target(v string) HTMLArea // Title specifies extra information about an element. Title(v string) HTMLArea // Type specifies the type of element. Type(v string) HTMLArea // OnBlur calls the given handler when the element loses focus. OnBlur(h EventHandler, scope ...interface{}) HTMLArea // OnChange calls the given handler when the value of the element is changed. OnChange(h EventHandler, scope ...interface{}) HTMLArea // OnClick calls the given handler when there is a mouse click on the element. OnClick(h EventHandler, scope ...interface{}) HTMLArea // OnContextMenu calls the given handler when a context menu is triggered. OnContextMenu(h EventHandler, scope ...interface{}) HTMLArea // OnCopy calls the given handler when the user copies the content of an element. OnCopy(h EventHandler, scope ...interface{}) HTMLArea // OnCut calls the given handler when the user cuts the content of an element. OnCut(h EventHandler, scope ...interface{}) HTMLArea // OnDblClick calls the given handler when there is a mouse double-click on the element. OnDblClick(h EventHandler, scope ...interface{}) HTMLArea // OnDrag calls the given handler when an element is dragged. OnDrag(h EventHandler, scope ...interface{}) HTMLArea // OnDragEnd calls the given handler at the end of a drag operation. OnDragEnd(h EventHandler, scope ...interface{}) HTMLArea // OnDragEnter calls the given handler when an element has been dragged to a valid drop target. OnDragEnter(h EventHandler, scope ...interface{}) HTMLArea // OnDragLeave calls the given handler when an element leaves a valid drop target. OnDragLeave(h EventHandler, scope ...interface{}) HTMLArea // OnDragOver calls the given handler when an element is being dragged over a valid drop target. OnDragOver(h EventHandler, scope ...interface{}) HTMLArea // OnDragStart calls the given handler at the start of a drag operation. OnDragStart(h EventHandler, scope ...interface{}) HTMLArea // OnDrop calls the given handler when dragged element is being dropped. OnDrop(h EventHandler, scope ...interface{}) HTMLArea // OnFocus calls the given handler when the element gets focus. OnFocus(h EventHandler, scope ...interface{}) HTMLArea // OnInput calls the given handler when an element gets user input. OnInput(h EventHandler, scope ...interface{}) HTMLArea // OnInvalid calls the given handler when an element is invalid. OnInvalid(h EventHandler, scope ...interface{}) HTMLArea // OnKeyDown calls the given handler when a user is pressing a key. OnKeyDown(h EventHandler, scope ...interface{}) HTMLArea // OnKeyPress calls the given handler when a user presses a key. OnKeyPress(h EventHandler, scope ...interface{}) HTMLArea // OnKeyup calls the given handler when a user releases a key. OnKeyup(h EventHandler, scope ...interface{}) HTMLArea // OnMouseDown calls the given handler when a mouse button is pressed down on an element. OnMouseDown(h EventHandler, scope ...interface{}) HTMLArea // OnMouseMove calls the given handler when the mouse pointer is moving while it is over an element. OnMouseMove(h EventHandler, scope ...interface{}) HTMLArea // OnMouseOut calls the given handler when the mouse pointer moves out of an element. OnMouseOut(h EventHandler, scope ...interface{}) HTMLArea // OnMouseOver calls the given handler when the mouse pointer moves over an element. OnMouseOver(h EventHandler, scope ...interface{}) HTMLArea // OnMouseUp calls the given handler when a mouse button is released over an element. OnMouseUp(h EventHandler, scope ...interface{}) HTMLArea // OnPaste calls the given handler when the user pastes some content in an element. OnPaste(h EventHandler, scope ...interface{}) HTMLArea // OnReset calls the given handler when the Reset button in a form is clicked. OnReset(h EventHandler, scope ...interface{}) HTMLArea // OnScroll calls the given handler when an element's scrollbar is being scrolled. OnScroll(h EventHandler, scope ...interface{}) HTMLArea // OnSearch calls the given handler when the user writes something in a search field. OnSearch(h EventHandler, scope ...interface{}) HTMLArea // OnSelect calls the given handler after some text has been selected in an element. OnSelect(h EventHandler, scope ...interface{}) HTMLArea // OnSubmit calls the given handler when a form is submitted. OnSubmit(h EventHandler, scope ...interface{}) HTMLArea // OnWheel calls the given handler when the mouse wheel rolls up or down over an element. OnWheel(h EventHandler, scope ...interface{}) HTMLArea }
HTMLArea is the interface that describes a <area> HTML element.
type HTMLArticle ¶
type HTMLArticle interface { UI // Body set the content of the element. Body(elems ...UI) HTMLArticle // Text sets the content of the element with a text node containing the stringified given value. Text(v interface{}) HTMLArticle // AccessKey specifies a shortcut key to activate/focus an element. AccessKey(v string) HTMLArticle // Aria stores accessible rich internet applications (ARIA) data. Aria(k string, v interface{}) HTMLArticle // Class specifies one or more classnames for an element (refers to a class in a style sheet). Multiple classnames are space separated. Class(v string) HTMLArticle // ContentEditable specifies whether the content of an element is editable or not. ContentEditable(v bool) HTMLArticle // DataSet stores custom data private to the page or application. DataSet(k string, v interface{}) HTMLArticle // Dir specifies the text direction for the content in an element. Dir(v string) HTMLArticle // Draggable specifies whether an element is draggable or not. Draggable(v bool) HTMLArticle // Hidden specifies that an element is not yet, or is no longer relevant. Hidden(v bool) HTMLArticle // ID specifies a unique id for an element. ID(v string) HTMLArticle // Lang specifies the language of the element's content. Lang(v string) HTMLArticle // Spellcheck specifies whether the element is to have its spelling and grammar checked or not. Spellcheck(v bool) HTMLArticle // Style specifies a CSS style for an element. Can be called multiple times to set multiple css styles. Style(k, v string) HTMLArticle // TabIndex specifies the tabbing order of an element. TabIndex(v int) HTMLArticle // Title specifies extra information about an element. Title(v string) HTMLArticle // OnBlur calls the given handler when the element loses focus. OnBlur(h EventHandler, scope ...interface{}) HTMLArticle // OnChange calls the given handler when the value of the element is changed. OnChange(h EventHandler, scope ...interface{}) HTMLArticle // OnClick calls the given handler when there is a mouse click on the element. OnClick(h EventHandler, scope ...interface{}) HTMLArticle // OnContextMenu calls the given handler when a context menu is triggered. OnContextMenu(h EventHandler, scope ...interface{}) HTMLArticle // OnCopy calls the given handler when the user copies the content of an element. OnCopy(h EventHandler, scope ...interface{}) HTMLArticle // OnCut calls the given handler when the user cuts the content of an element. OnCut(h EventHandler, scope ...interface{}) HTMLArticle // OnDblClick calls the given handler when there is a mouse double-click on the element. OnDblClick(h EventHandler, scope ...interface{}) HTMLArticle // OnDrag calls the given handler when an element is dragged. OnDrag(h EventHandler, scope ...interface{}) HTMLArticle // OnDragEnd calls the given handler at the end of a drag operation. OnDragEnd(h EventHandler, scope ...interface{}) HTMLArticle // OnDragEnter calls the given handler when an element has been dragged to a valid drop target. OnDragEnter(h EventHandler, scope ...interface{}) HTMLArticle // OnDragLeave calls the given handler when an element leaves a valid drop target. OnDragLeave(h EventHandler, scope ...interface{}) HTMLArticle // OnDragOver calls the given handler when an element is being dragged over a valid drop target. OnDragOver(h EventHandler, scope ...interface{}) HTMLArticle // OnDragStart calls the given handler at the start of a drag operation. OnDragStart(h EventHandler, scope ...interface{}) HTMLArticle // OnDrop calls the given handler when dragged element is being dropped. OnDrop(h EventHandler, scope ...interface{}) HTMLArticle // OnFocus calls the given handler when the element gets focus. OnFocus(h EventHandler, scope ...interface{}) HTMLArticle // OnInput calls the given handler when an element gets user input. OnInput(h EventHandler, scope ...interface{}) HTMLArticle // OnInvalid calls the given handler when an element is invalid. OnInvalid(h EventHandler, scope ...interface{}) HTMLArticle // OnKeyDown calls the given handler when a user is pressing a key. OnKeyDown(h EventHandler, scope ...interface{}) HTMLArticle // OnKeyPress calls the given handler when a user presses a key. OnKeyPress(h EventHandler, scope ...interface{}) HTMLArticle // OnKeyup calls the given handler when a user releases a key. OnKeyup(h EventHandler, scope ...interface{}) HTMLArticle // OnMouseDown calls the given handler when a mouse button is pressed down on an element. OnMouseDown(h EventHandler, scope ...interface{}) HTMLArticle // OnMouseMove calls the given handler when the mouse pointer is moving while it is over an element. OnMouseMove(h EventHandler, scope ...interface{}) HTMLArticle // OnMouseOut calls the given handler when the mouse pointer moves out of an element. OnMouseOut(h EventHandler, scope ...interface{}) HTMLArticle // OnMouseOver calls the given handler when the mouse pointer moves over an element. OnMouseOver(h EventHandler, scope ...interface{}) HTMLArticle // OnMouseUp calls the given handler when a mouse button is released over an element. OnMouseUp(h EventHandler, scope ...interface{}) HTMLArticle // OnPaste calls the given handler when the user pastes some content in an element. OnPaste(h EventHandler, scope ...interface{}) HTMLArticle // OnReset calls the given handler when the Reset button in a form is clicked. OnReset(h EventHandler, scope ...interface{}) HTMLArticle // OnScroll calls the given handler when an element's scrollbar is being scrolled. OnScroll(h EventHandler, scope ...interface{}) HTMLArticle // OnSearch calls the given handler when the user writes something in a search field. OnSearch(h EventHandler, scope ...interface{}) HTMLArticle // OnSelect calls the given handler after some text has been selected in an element. OnSelect(h EventHandler, scope ...interface{}) HTMLArticle // OnSubmit calls the given handler when a form is submitted. OnSubmit(h EventHandler, scope ...interface{}) HTMLArticle // OnWheel calls the given handler when the mouse wheel rolls up or down over an element. OnWheel(h EventHandler, scope ...interface{}) HTMLArticle }
HTMLArticle is the interface that describes a <article> HTML element.
type HTMLAside ¶
type HTMLAside interface { UI // Body set the content of the element. Body(elems ...UI) HTMLAside // Text sets the content of the element with a text node containing the stringified given value. Text(v interface{}) HTMLAside // AccessKey specifies a shortcut key to activate/focus an element. AccessKey(v string) HTMLAside // Aria stores accessible rich internet applications (ARIA) data. Aria(k string, v interface{}) HTMLAside // Class specifies one or more classnames for an element (refers to a class in a style sheet). Multiple classnames are space separated. Class(v string) HTMLAside // ContentEditable specifies whether the content of an element is editable or not. ContentEditable(v bool) HTMLAside // DataSet stores custom data private to the page or application. DataSet(k string, v interface{}) HTMLAside // Dir specifies the text direction for the content in an element. Dir(v string) HTMLAside // Draggable specifies whether an element is draggable or not. Draggable(v bool) HTMLAside // Hidden specifies that an element is not yet, or is no longer relevant. Hidden(v bool) HTMLAside // ID specifies a unique id for an element. ID(v string) HTMLAside // Lang specifies the language of the element's content. Lang(v string) HTMLAside // Spellcheck specifies whether the element is to have its spelling and grammar checked or not. Spellcheck(v bool) HTMLAside // Style specifies a CSS style for an element. Can be called multiple times to set multiple css styles. Style(k, v string) HTMLAside // TabIndex specifies the tabbing order of an element. TabIndex(v int) HTMLAside // Title specifies extra information about an element. Title(v string) HTMLAside // OnBlur calls the given handler when the element loses focus. OnBlur(h EventHandler, scope ...interface{}) HTMLAside // OnChange calls the given handler when the value of the element is changed. OnChange(h EventHandler, scope ...interface{}) HTMLAside // OnClick calls the given handler when there is a mouse click on the element. OnClick(h EventHandler, scope ...interface{}) HTMLAside // OnContextMenu calls the given handler when a context menu is triggered. OnContextMenu(h EventHandler, scope ...interface{}) HTMLAside // OnCopy calls the given handler when the user copies the content of an element. OnCopy(h EventHandler, scope ...interface{}) HTMLAside // OnCut calls the given handler when the user cuts the content of an element. OnCut(h EventHandler, scope ...interface{}) HTMLAside // OnDblClick calls the given handler when there is a mouse double-click on the element. OnDblClick(h EventHandler, scope ...interface{}) HTMLAside // OnDrag calls the given handler when an element is dragged. OnDrag(h EventHandler, scope ...interface{}) HTMLAside // OnDragEnd calls the given handler at the end of a drag operation. OnDragEnd(h EventHandler, scope ...interface{}) HTMLAside // OnDragEnter calls the given handler when an element has been dragged to a valid drop target. OnDragEnter(h EventHandler, scope ...interface{}) HTMLAside // OnDragLeave calls the given handler when an element leaves a valid drop target. OnDragLeave(h EventHandler, scope ...interface{}) HTMLAside // OnDragOver calls the given handler when an element is being dragged over a valid drop target. OnDragOver(h EventHandler, scope ...interface{}) HTMLAside // OnDragStart calls the given handler at the start of a drag operation. OnDragStart(h EventHandler, scope ...interface{}) HTMLAside // OnDrop calls the given handler when dragged element is being dropped. OnDrop(h EventHandler, scope ...interface{}) HTMLAside // OnFocus calls the given handler when the element gets focus. OnFocus(h EventHandler, scope ...interface{}) HTMLAside // OnInput calls the given handler when an element gets user input. OnInput(h EventHandler, scope ...interface{}) HTMLAside // OnInvalid calls the given handler when an element is invalid. OnInvalid(h EventHandler, scope ...interface{}) HTMLAside // OnKeyDown calls the given handler when a user is pressing a key. OnKeyDown(h EventHandler, scope ...interface{}) HTMLAside // OnKeyPress calls the given handler when a user presses a key. OnKeyPress(h EventHandler, scope ...interface{}) HTMLAside // OnKeyup calls the given handler when a user releases a key. OnKeyup(h EventHandler, scope ...interface{}) HTMLAside // OnMouseDown calls the given handler when a mouse button is pressed down on an element. OnMouseDown(h EventHandler, scope ...interface{}) HTMLAside // OnMouseMove calls the given handler when the mouse pointer is moving while it is over an element. OnMouseMove(h EventHandler, scope ...interface{}) HTMLAside // OnMouseOut calls the given handler when the mouse pointer moves out of an element. OnMouseOut(h EventHandler, scope ...interface{}) HTMLAside // OnMouseOver calls the given handler when the mouse pointer moves over an element. OnMouseOver(h EventHandler, scope ...interface{}) HTMLAside // OnMouseUp calls the given handler when a mouse button is released over an element. OnMouseUp(h EventHandler, scope ...interface{}) HTMLAside // OnPaste calls the given handler when the user pastes some content in an element. OnPaste(h EventHandler, scope ...interface{}) HTMLAside // OnReset calls the given handler when the Reset button in a form is clicked. OnReset(h EventHandler, scope ...interface{}) HTMLAside // OnScroll calls the given handler when an element's scrollbar is being scrolled. OnScroll(h EventHandler, scope ...interface{}) HTMLAside // OnSearch calls the given handler when the user writes something in a search field. OnSearch(h EventHandler, scope ...interface{}) HTMLAside // OnSelect calls the given handler after some text has been selected in an element. OnSelect(h EventHandler, scope ...interface{}) HTMLAside // OnSubmit calls the given handler when a form is submitted. OnSubmit(h EventHandler, scope ...interface{}) HTMLAside // OnWheel calls the given handler when the mouse wheel rolls up or down over an element. OnWheel(h EventHandler, scope ...interface{}) HTMLAside }
HTMLAside is the interface that describes a <aside> HTML element.
type HTMLAudio ¶
type HTMLAudio interface { UI // Body set the content of the element. Body(elems ...UI) HTMLAudio // Text sets the content of the element with a text node containing the stringified given value. Text(v interface{}) HTMLAudio // AccessKey specifies a shortcut key to activate/focus an element. AccessKey(v string) HTMLAudio // Aria stores accessible rich internet applications (ARIA) data. Aria(k string, v interface{}) HTMLAudio // AutoPlay specifies that the audio/video will start playing as soon as it is ready. AutoPlay(v bool) HTMLAudio // Class specifies one or more classnames for an element (refers to a class in a style sheet). Multiple classnames are space separated. Class(v string) HTMLAudio // ContentEditable specifies whether the content of an element is editable or not. ContentEditable(v bool) HTMLAudio // Controls specifies that audio/video controls should be displayed (such as a play/pause button etc). Controls(v bool) HTMLAudio // CrossOrigin sets the mode of the request to an HTTP CORS Request. CrossOrigin(v string) HTMLAudio // DataSet stores custom data private to the page or application. DataSet(k string, v interface{}) HTMLAudio // Dir specifies the text direction for the content in an element. Dir(v string) HTMLAudio // Draggable specifies whether an element is draggable or not. Draggable(v bool) HTMLAudio // Hidden specifies that an element is not yet, or is no longer relevant. Hidden(v bool) HTMLAudio // ID specifies a unique id for an element. ID(v string) HTMLAudio // Lang specifies the language of the element's content. Lang(v string) HTMLAudio // Loop specifies that the audio/video will start over again, every time it is finished. Loop(v bool) HTMLAudio // Muted specifies that the audio output of the video should be muted. Muted(v bool) HTMLAudio // Preload specifies if and how the author thinks the audio/video should be loaded when the page loads. Preload(v string) HTMLAudio // Spellcheck specifies whether the element is to have its spelling and grammar checked or not. Spellcheck(v bool) HTMLAudio // Src specifies the URL of the media file. Src(v string) HTMLAudio // Style specifies a CSS style for an element. Can be called multiple times to set multiple css styles. Style(k, v string) HTMLAudio // TabIndex specifies the tabbing order of an element. TabIndex(v int) HTMLAudio // Title specifies extra information about an element. Title(v string) HTMLAudio // OnAbort calls the given handler on abort. OnAbort(h EventHandler, scope ...interface{}) HTMLAudio // OnBlur calls the given handler when the element loses focus.  OnCanPlay(h EventHandler, scope ...interface{}) HTMLAudio // OnCanPlayThrough calls the given handler when a file can be played all the way to the end without pausing for buffering. OnCanPlayThrough(h EventHandler, scope ...interface{}) HTMLAudio // OnChange calls the given handler when the value of the element is changed. OnChange(h EventHandler, scope ...interface{}) HTMLAudio // OnClick calls the given handler when there is a mouse click on the element. OnClick(h EventHandler, scope ...interface{}) HTMLAudio // OnContextMenu calls the given handler when a context menu is triggered. OnContextMenu(h EventHandler, scope ...interface{}) HTMLAudio // OnCopy calls the given handler when the user copies the content of an element. OnCopy(h EventHandler, scope ...interface{}) HTMLAudio // OnCueChange calls the given handler when the cue changes in a track element. OnCueChange(h EventHandler, scope ...interface{}) HTMLAudio // OnCut calls the given handler when the user cuts the content of an element. OnCut(h EventHandler, scope ...interface{}) HTMLAudio // OnDblClick calls the given handler when there is a mouse double-click on the element. OnDblClick(h EventHandler, scope ...interface{}) HTMLAudio // OnDrag calls the given handler when an element is dragged. OnDrag(h EventHandler, scope ...interface{}) HTMLAudio // OnDragEnd calls the given handler at the end of a drag operation. OnDragEnd(h EventHandler, scope ...interface{}) HTMLAudio // OnDragEnter calls the given handler when an element has been dragged to a valid drop target. OnDragEnter(h EventHandler, scope ...interface{}) HTMLAudio // OnDragLeave calls the given handler when an element leaves a valid drop target. OnDragLeave(h EventHandler, scope ...interface{}) HTMLAudio // OnDragOver calls the given handler when an element is being dragged over a valid drop target. OnDragOver(h EventHandler, scope ...interface{}) HTMLAudio // OnDragStart calls the given handler at the start of a drag operation. OnDragStart(h EventHandler, scope ...interface{}) HTMLAudio // OnDrop calls the given handler when dragged element is being dropped. OnDrop(h EventHandler, scope ...interface{}) HTMLAudio // OnDurationChange calls the given handler when the length of the media changes. OnDurationChange(h EventHandler, scope ...interface{}) HTMLAudio // OnEmptied calls the given handler when something bad happens and the file is suddenly unavailable (like unexpectedly disconnects). OnEmptied(h EventHandler, scope ...interface{}) HTMLAudio // OnEnded calls the given handler when the media has reach the end. OnEnded(h EventHandler, scope ...interface{}) HTMLAudio // OnError calls the given handler when an error occurs. OnError(h EventHandler, scope ...interface{}) HTMLAudio // OnFocus calls the given handler when the element gets focus. OnFocus(h EventHandler, scope ...interface{}) HTMLAudio // OnInput calls the given handler when an element gets user input. OnInput(h EventHandler, scope ...interface{}) HTMLAudio // OnInvalid calls the given handler when an element is invalid. OnInvalid(h EventHandler, scope ...interface{}) HTMLAudio // OnKeyDown calls the given handler when a user is pressing a key. OnKeyDown(h EventHandler, scope ...interface{}) HTMLAudio // OnKeyPress calls the given handler when a user presses a key. OnKeyPress(h EventHandler, scope ...interface{}) HTMLAudio // OnKeyup calls the given handler when a user releases a key. OnKeyup(h EventHandler, scope ...interface{}) HTMLAudio // OnLoadStart calls the given handler just as the file begins to load before anything is actually loaded. OnLoadStart(h EventHandler, scope ...interface{}) HTMLAudio // OnLoadedData calls the given handler when media data is loaded. OnLoadedData(h EventHandler, scope ...interface{}) HTMLAudio // OnMouseDown calls the given handler when a mouse button is pressed down on an element. OnMouseDown(h EventHandler, scope ...interface{}) HTMLAudio // OnMouseMove calls the given handler when the mouse pointer is moving while it is over an element. OnMouseMove(h EventHandler, scope ...interface{}) HTMLAudio // OnMouseOut calls the given handler when the mouse pointer moves out of an element. OnMouseOut(h EventHandler, scope ...interface{}) HTMLAudio // OnMouseOver calls the given handler when the mouse pointer moves over an element. OnMouseOver(h EventHandler, scope ...interface{}) HTMLAudio // OnMouseUp calls the given handler when a mouse button is released over an element. OnMouseUp(h EventHandler, scope ...interface{}) HTMLAudio // OnPaste calls the given handler when the user pastes some content in an element. OnPaste(h EventHandler, scope ...interface{}) HTMLAudio // OnPause calls the given handler when the media is paused either by the user or programmatically. OnPause(h EventHandler, scope ...interface{}) HTMLAudio // OnPlay calls the given handler when the media is ready to start playing. OnPlay(h EventHandler, scope ...interface{}) HTMLAudio // OnPlaying calls the given handler when the media actually has started playing. OnPlaying(h EventHandler, scope ...interface{}) HTMLAudio // OnProgress calls the given handler when the browser is in the process of getting the media data. OnProgress(h EventHandler, scope ...interface{}) HTMLAudio // OnRateChange calls the given handler each time the playback rate changes (like when a user switches to a slow motion or fast forward mode). OnRateChange(h EventHandler, scope ...interface{}) HTMLAudio // OnReset calls the given handler when the Reset button in a form is clicked. OnReset(h EventHandler, scope ...interface{}) HTMLAudio // OnScroll calls the given handler when an element's scrollbar is being scrolled. OnScroll(h EventHandler, scope ...interface{}) HTMLAudio // OnSearch calls the given handler when the user writes something in a search field. OnSearch(h EventHandler, scope ...interface{}) HTMLAudio // OnSeeked calls the given handler when the seeking attribute is set to false indicating that seeking has ended. OnSeeked(h EventHandler, scope ...interface{}) HTMLAudio // OnSeeking calls the given handler when the seeking attribute is set to true indicating that seeking is active. OnSeeking(h EventHandler, scope ...interface{}) HTMLAudio // OnSelect calls the given handler after some text has been selected in an element. OnSelect(h EventHandler, scope ...interface{}) HTMLAudio // OnStalled calls the given handler when the browser is unable to fetch the media data for whatever reason. OnStalled(h EventHandler, scope ...interface{}) HTMLAudio // OnSubmit calls the given handler when a form is submitted. OnSubmit(h EventHandler, scope ...interface{}) HTMLAudio // OnSuspend calls the given handler when fetching the media data is stopped before it is completely loaded for whatever reason. OnSuspend(h EventHandler, scope ...interface{}) HTMLAudio // OnTimeUpdate calls the given handler when the playing position has changed (like when the user fast forwards to a different point in the media). OnTimeUpdate(h EventHandler, scope ...interface{}) HTMLAudio // OnVolumeChange calls the given handler each time the volume is changed which (includes setting the volume to "mute"). OnVolumeChange(h EventHandler, scope ...interface{}) HTMLAudio // OnWaiting calls the given handler when the media has paused but is expected to resume (like when the media pauses to buffer more data). OnWaiting(h EventHandler, scope ...interface{}) HTMLAudio // OnWheel calls the given handler when the mouse wheel rolls up or down over an element. OnWheel(h EventHandler, scope ...interface{}) HTMLAudio // OnloadedMetaData calls the given handler when meta data (like dimensions and duration) are loaded. OnloadedMetaData(h EventHandler, scope ...interface{}) HTMLAudio }
HTMLAudio is the interface that describes a <audio> HTML element.
type HTMLB ¶
type HTMLB interface { UI // Body set the content of the element. Body(elems ...UI) HTMLB // Text sets the content of the element with a text node containing the stringified given value. Text(v interface{}) HTMLB // AccessKey specifies a shortcut key to activate/focus an element. AccessKey(v string) HTMLB // Aria stores accessible rich internet applications (ARIA) data. Aria(k string, v interface{}) HTMLB // Class specifies one or more classnames for an element (refers to a class in a style sheet). Multiple classnames are space separated. Class(v string) HTMLB // ContentEditable specifies whether the content of an element is editable or not. ContentEditable(v bool) HTMLB // DataSet stores custom data private to the page or application. DataSet(k string, v interface{}) HTMLB // Dir specifies the text direction for the content in an element. Dir(v string) HTMLB // Draggable specifies whether an element is draggable or not. Draggable(v bool) HTMLB // Hidden specifies that an element is not yet, or is no longer relevant. Hidden(v bool) HTMLB // ID specifies a unique id for an element. ID(v string) HTMLB // Lang specifies the language of the element's content. Lang(v string) HTMLB // Spellcheck specifies whether the element is to have its spelling and grammar checked or not. Spellcheck(v bool) HTMLB // Style specifies a CSS style for an element. Can be called multiple times to set multiple css styles. Style(k, v string) HTMLB // TabIndex specifies the tabbing order of an element. TabIndex(v int) HTMLB // Title specifies extra information about an element. Title(v string) HTMLB // OnBlur calls the given handler when the element loses focus. OnBlur(h EventHandler, scope ...interface{}) HTMLB // OnChange calls the given handler when the value of the element is changed. OnChange(h EventHandler, scope ...interface{}) HTMLB // OnClick calls the given handler when there is a mouse click on the element. OnClick(h EventHandler, scope ...interface{}) HTMLB // OnContextMenu calls the given handler when a context menu is triggered. OnContextMenu(h EventHandler, scope ...interface{}) HTMLB // OnCopy calls the given handler when the user copies the content of an element. OnCopy(h EventHandler, scope ...interface{}) HTMLB // OnCut calls the given handler when the user cuts the content of an element. OnCut(h EventHandler, scope ...interface{}) HTMLB // OnDblClick calls the given handler when there is a mouse double-click on the element. OnDblClick(h EventHandler, scope ...interface{}) HTMLB // OnDrag calls the given handler when an element is dragged. OnDrag(h EventHandler, scope ...interface{}) HTMLB // OnDragEnd calls the given handler at the end of a drag operation. OnDragEnd(h EventHandler, scope ...interface{}) HTMLB // OnDragEnter calls the given handler when an element has been dragged to a valid drop target. OnDragEnter(h EventHandler, scope ...interface{}) HTMLB // OnDragLeave calls the given handler when an element leaves a valid drop target. OnDragLeave(h EventHandler, scope ...interface{}) HTMLB // OnDragOver calls the given handler when an element is being dragged over a valid drop target. OnDragOver(h EventHandler, scope ...interface{}) HTMLB // OnDragStart calls the given handler at the start of a drag operation. OnDragStart(h EventHandler, scope ...interface{}) HTMLB // OnDrop calls the given handler when dragged element is being dropped. OnDrop(h EventHandler, scope ...interface{}) HTMLB // OnFocus calls the given handler when the element gets focus. OnFocus(h EventHandler, scope ...interface{}) HTMLB // OnInput calls the given handler when an element gets user input. OnInput(h EventHandler, scope ...interface{}) HTMLB // OnInvalid calls the given handler when an element is invalid. OnInvalid(h EventHandler, scope ...interface{}) HTMLB // OnKeyDown calls the given handler when a user is pressing a key. OnKeyDown(h EventHandler, scope ...interface{}) HTMLB // OnKeyPress calls the given handler when a user presses a key. OnKeyPress(h EventHandler, scope ...interface{}) HTMLB // OnKeyup calls the given handler when a user releases a key. OnKeyup(h EventHandler, scope ...interface{}) HTMLB // OnMouseDown calls the given handler when a mouse button is pressed down on an element. OnMouseDown(h EventHandler, scope ...interface{}) HTMLB // OnMouseMove calls the given handler when the mouse pointer is moving while it is over an element. OnMouseMove(h EventHandler, scope ...interface{}) HTMLB // OnMouseOut calls the given handler when the mouse pointer moves out of an element. OnMouseOut(h EventHandler, scope ...interface{}) HTMLB // OnMouseOver calls the given handler when the mouse pointer moves over an element. OnMouseOver(h EventHandler, scope ...interface{}) HTMLB // OnMouseUp calls the given handler when a mouse button is released over an element. OnMouseUp(h EventHandler, scope ...interface{}) HTMLB // OnPaste calls the given handler when the user pastes some content in an element. OnPaste(h EventHandler, scope ...interface{}) HTMLB // OnReset calls the given handler when the Reset button in a form is clicked. OnReset(h EventHandler, scope ...interface{}) HTMLB // OnScroll calls the given handler when an element's scrollbar is being scrolled. OnScroll(h EventHandler, scope ...interface{}) HTMLB // OnSearch calls the given handler when the user writes something in a search field. OnSearch(h EventHandler, scope ...interface{}) HTMLB // OnSelect calls the given handler after some text has been selected in an element. OnSelect(h EventHandler, scope ...interface{}) HTMLB // OnSubmit calls the given handler when a form is submitted. OnSubmit(h EventHandler, scope ...interface{}) HTMLB // OnWheel calls the given handler when the mouse wheel rolls up or down over an element. OnWheel(h EventHandler, scope ...interface{}) HTMLB }
HTMLB is the interface that describes a <b> HTML element.
type HTMLBase ¶
type HTMLBase interface { UI // AccessKey specifies a shortcut key to activate/focus an element. AccessKey(v string) HTMLBase // Aria stores accessible rich internet applications (ARIA) data. Aria(k string, v interface{}) HTMLBase // Class specifies one or more classnames for an element (refers to a class in a style sheet). Multiple classnames are space separated. Class(v string) HTMLBase // ContentEditable specifies whether the content of an element is editable or not. ContentEditable(v bool) HTMLBase // DataSet stores custom data private to the page or application. DataSet(k string, v interface{}) HTMLBase // Dir specifies the text direction for the content in an element. Dir(v string) HTMLBase // Draggable specifies whether an element is draggable or not. Draggable(v bool) HTMLBase // Hidden specifies that an element is not yet, or is no longer relevant. Hidden(v bool) HTMLBase // Href specifies the URL of the page the link goes to. Href(v string) HTMLBase // ID specifies a unique id for an element. ID(v string) HTMLBase // Lang specifies the language of the element's content. Lang(v string) HTMLBase // Spellcheck specifies whether the element is to have its spelling and grammar checked or not. Spellcheck(v bool) HTMLBase // Style specifies a CSS style for an element. Can be called multiple times to set multiple css styles. Style(k, v string) HTMLBase // TabIndex specifies the tabbing order of an element. TabIndex(v int) HTMLBase // Target specifies the target for where to open the linked document or where to submit the form. Target(v string) HTMLBase // Title specifies extra information about an element. Title(v string) HTMLBase // OnBlur calls the given handler when the element loses focus. OnBlur(h EventHandler, scope ...interface{}) HTMLBase // OnChange calls the given handler when the value of the element is changed. OnChange(h EventHandler, scope ...interface{}) HTMLBase // OnClick calls the given handler when there is a mouse click on the element. OnClick(h EventHandler, scope ...interface{}) HTMLBase // OnContextMenu calls the given handler when a context menu is triggered. OnContextMenu(h EventHandler, scope ...interface{}) HTMLBase // OnCopy calls the given handler when the user copies the content of an element. OnCopy(h EventHandler, scope ...interface{}) HTMLBase // OnCut calls the given handler when the user cuts the content of an element. OnCut(h EventHandler, scope ...interface{}) HTMLBase // OnDblClick calls the given handler when there is a mouse double-click on the element. OnDblClick(h EventHandler, scope ...interface{}) HTMLBase // OnDrag calls the given handler when an element is dragged. OnDrag(h EventHandler, scope ...interface{}) HTMLBase // OnDragEnd calls the given handler at the end of a drag operation. OnDragEnd(h EventHandler, scope ...interface{}) HTMLBase // OnDragEnter calls the given handler when an element has been dragged to a valid drop target. OnDragEnter(h EventHandler, scope ...interface{}) HTMLBase // OnDragLeave calls the given handler when an element leaves a valid drop target. OnDragLeave(h EventHandler, scope ...interface{}) HTMLBase // OnDragOver calls the given handler when an element is being dragged over a valid drop target. OnDragOver(h EventHandler, scope ...interface{}) HTMLBase // OnDragStart calls the given handler at the start of a drag operation. OnDragStart(h EventHandler, scope ...interface{}) HTMLBase // OnDrop calls the given handler when dragged element is being dropped. OnDrop(h EventHandler, scope ...interface{}) HTMLBase // OnFocus calls the given handler when the element gets focus. OnFocus(h EventHandler, scope ...interface{}) HTMLBase // OnInput calls the given handler when an element gets user input. OnInput(h EventHandler, scope ...interface{}) HTMLBase // OnInvalid calls the given handler when an element is invalid. OnInvalid(h EventHandler, scope ...interface{}) HTMLBase // OnKeyDown calls the given handler when a user is pressing a key. OnKeyDown(h EventHandler, scope ...interface{}) HTMLBase // OnKeyPress calls the given handler when a user presses a key. OnKeyPress(h EventHandler, scope ...interface{}) HTMLBase // OnKeyup calls the given handler when a user releases a key. OnKeyup(h EventHandler, scope ...interface{}) HTMLBase // OnMouseDown calls the given handler when a mouse button is pressed down on an element. OnMouseDown(h EventHandler, scope ...interface{}) HTMLBase // OnMouseMove calls the given handler when the mouse pointer is moving while it is over an element. OnMouseMove(h EventHandler, scope ...interface{}) HTMLBase // OnMouseOut calls the given handler when the mouse pointer moves out of an element. OnMouseOut(h EventHandler, scope ...interface{}) HTMLBase // OnMouseOver calls the given handler when the mouse pointer moves over an element. OnMouseOver(h EventHandler, scope ...interface{}) HTMLBase // OnMouseUp calls the given handler when a mouse button is released over an element. OnMouseUp(h EventHandler, scope ...interface{}) HTMLBase // OnPaste calls the given handler when the user pastes some content in an element. OnPaste(h EventHandler, scope ...interface{}) HTMLBase // OnReset calls the given handler when the Reset button in a form is clicked. OnReset(h EventHandler, scope ...interface{}) HTMLBase // OnScroll calls the given handler when an element's scrollbar is being scrolled. OnScroll(h EventHandler, scope ...interface{}) HTMLBase // OnSearch calls the given handler when the user writes something in a search field. OnSearch(h EventHandler, scope ...interface{}) HTMLBase // OnSelect calls the given handler after some text has been selected in an element. OnSelect(h EventHandler, scope ...interface{}) HTMLBase // OnSubmit calls the given handler when a form is submitted. OnSubmit(h EventHandler, scope ...interface{}) HTMLBase // OnWheel calls the given handler when the mouse wheel rolls up or down over an element. OnWheel(h EventHandler, scope ...interface{}) HTMLBase }
HTMLBase is the interface that describes a <base> HTML element.
type HTMLBdi ¶
type HTMLBdi interface { UI // Body set the content of the element. Body(elems ...UI) HTMLBdi // Text sets the content of the element with a text node containing the stringified given value. Text(v interface{}) HTMLBdi // AccessKey specifies a shortcut key to activate/focus an element. AccessKey(v string) HTMLBdi // Aria stores accessible rich internet applications (ARIA) data. Aria(k string, v interface{}) HTMLBdi // Class specifies one or more classnames for an element (refers to a class in a style sheet). Multiple classnames are space separated. Class(v string) HTMLBdi // ContentEditable specifies whether the content of an element is editable or not. ContentEditable(v bool) HTMLBdi // DataSet stores custom data private to the page or application. DataSet(k string, v interface{}) HTMLBdi // Dir specifies the text direction for the content in an element. Dir(v string) HTMLBdi // Draggable specifies whether an element is draggable or not. Draggable(v bool) HTMLBdi // Hidden specifies that an element is not yet, or is no longer relevant. Hidden(v bool) HTMLBdi // ID specifies a unique id for an element. ID(v string) HTMLBdi // Lang specifies the language of the element's content. Lang(v string) HTMLBdi // Spellcheck specifies whether the element is to have its spelling and grammar checked or not. Spellcheck(v bool) HTMLBdi // Style specifies a CSS style for an element. Can be called multiple times to set multiple css styles. Style(k, v string) HTMLBdi // TabIndex specifies the tabbing order of an element. TabIndex(v int) HTMLBdi // Title specifies extra information about an element. Title(v string) HTMLBdi // OnBlur calls the given handler when the element loses focus. OnBlur(h EventHandler, scope ...interface{}) HTMLBdi // OnChange calls the given handler when the value of the element is changed. OnChange(h EventHandler, scope ...interface{}) HTMLBdi // OnClick calls the given handler when there is a mouse click on the element. OnClick(h EventHandler, scope ...interface{}) HTMLBdi // OnContextMenu calls the given handler when a context menu is triggered. OnContextMenu(h EventHandler, scope ...interface{}) HTMLBdi // OnCopy calls the given handler when the user copies the content of an element. OnCopy(h EventHandler, scope ...interface{}) HTMLBdi // OnCut calls the given handler when the user cuts the content of an element. OnCut(h EventHandler, scope ...interface{}) HTMLBdi // OnDblClick calls the given handler when there is a mouse double-click on the element. OnDblClick(h EventHandler, scope ...interface{}) HTMLBdi // OnDrag calls the given handler when an element is dragged. OnDrag(h EventHandler, scope ...interface{}) HTMLBdi // OnDragEnd calls the given handler at the end of a drag operation. OnDragEnd(h EventHandler, scope ...interface{}) HTMLBdi // OnDragEnter calls the given handler when an element has been dragged to a valid drop target. OnDragEnter(h EventHandler, scope ...interface{}) HTMLBdi // OnDragLeave calls the given handler when an element leaves a valid drop target. OnDragLeave(h EventHandler, scope ...interface{}) HTMLBdi // OnDragOver calls the given handler when an element is being dragged over a valid drop target. OnDragOver(h EventHandler, scope ...interface{}) HTMLBdi // OnDragStart calls the given handler at the start of a drag operation. OnDragStart(h EventHandler, scope ...interface{}) HTMLBdi // OnDrop calls the given handler when dragged element is being dropped. OnDrop(h EventHandler, scope ...interface{}) HTMLBdi // OnFocus calls the given handler when the element gets focus. OnFocus(h EventHandler, scope ...interface{}) HTMLBdi // OnInput calls the given handler when an element gets user input. OnInput(h EventHandler, scope ...interface{}) HTMLBdi // OnInvalid calls the given handler when an element is invalid. OnInvalid(h EventHandler, scope ...interface{}) HTMLBdi // OnKeyDown calls the given handler when a user is pressing a key. OnKeyDown(h EventHandler, scope ...interface{}) HTMLBdi // OnKeyPress calls the given handler when a user presses a key. OnKeyPress(h EventHandler, scope ...interface{}) HTMLBdi // OnKeyup calls the given handler when a user releases a key. OnKeyup(h EventHandler, scope ...interface{}) HTMLBdi // OnMouseDown calls the given handler when a mouse button is pressed down on an element. OnMouseDown(h EventHandler, scope ...interface{}) HTMLBdi // OnMouseMove calls the given handler when the mouse pointer is moving while it is over an element. OnMouseMove(h EventHandler, scope ...interface{}) HTMLBdi // OnMouseOut calls the given handler when the mouse pointer moves out of an element. OnMouseOut(h EventHandler, scope ...interface{}) HTMLBdi // OnMouseOver calls the given handler when the mouse pointer moves over an element. OnMouseOver(h EventHandler, scope ...interface{}) HTMLBdi // OnMouseUp calls the given handler when a mouse button is released over an element. OnMouseUp(h EventHandler, scope ...interface{}) HTMLBdi // OnPaste calls the given handler when the user pastes some content in an element. OnPaste(h EventHandler, scope ...interface{}) HTMLBdi // OnReset calls the given handler when the Reset button in a form is clicked. OnReset(h EventHandler, scope ...interface{}) HTMLBdi // OnScroll calls the given handler when an element's scrollbar is being scrolled. OnScroll(h EventHandler, scope ...interface{}) HTMLBdi // OnSearch calls the given handler when the user writes something in a search field. OnSearch(h EventHandler, scope ...interface{}) HTMLBdi // OnSelect calls the given handler after some text has been selected in an element. OnSelect(h EventHandler, scope ...interface{}) HTMLBdi // OnSubmit calls the given handler when a form is submitted. OnSubmit(h EventHandler, scope ...interface{}) HTMLBdi // OnWheel calls the given handler when the mouse wheel rolls up or down over an element. OnWheel(h EventHandler, scope ...interface{}) HTMLBdi }
HTMLBdi is the interface that describes a <bdi> HTML element.
type HTMLBdo ¶
type HTMLBdo interface { UI // Body set the content of the element. Body(elems ...UI) HTMLBdo // Text sets the content of the element with a text node containing the stringified given value. Text(v interface{}) HTMLBdo // AccessKey specifies a shortcut key to activate/focus an element. AccessKey(v string) HTMLBdo // Aria stores accessible rich internet applications (ARIA) data. Aria(k string, v interface{}) HTMLBdo // Class specifies one or more classnames for an element (refers to a class in a style sheet). Multiple classnames are space separated. Class(v string) HTMLBdo // ContentEditable specifies whether the content of an element is editable or not. ContentEditable(v bool) HTMLBdo // DataSet stores custom data private to the page or application. DataSet(k string, v interface{}) HTMLBdo // Dir specifies the text direction for the content in an element. Dir(v string) HTMLBdo // Draggable specifies whether an element is draggable or not. Draggable(v bool) HTMLBdo // Hidden specifies that an element is not yet, or is no longer relevant. Hidden(v bool) HTMLBdo // ID specifies a unique id for an element. ID(v string) HTMLBdo // Lang specifies the language of the element's content. Lang(v string) HTMLBdo // Spellcheck specifies whether the element is to have its spelling and grammar checked or not. Spellcheck(v bool) HTMLBdo // Style specifies a CSS style for an element. Can be called multiple times to set multiple css styles. Style(k, v string) HTMLBdo // TabIndex specifies the tabbing order of an element. TabIndex(v int) HTMLBdo // Title specifies extra information about an element. Title(v string) HTMLBdo // OnBlur calls the given handler when the element loses focus. OnBlur(h EventHandler, scope ...interface{}) HTMLBdo // OnChange calls the given handler when the value of the element is changed. OnChange(h EventHandler, scope ...interface{}) HTMLBdo // OnClick calls the given handler when there is a mouse click on the element. OnClick(h EventHandler, scope ...interface{}) HTMLBdo // OnContextMenu calls the given handler when a context menu is triggered. OnContextMenu(h EventHandler, scope ...interface{}) HTMLBdo // OnCopy calls the given handler when the user copies the content of an element. OnCopy(h EventHandler, scope ...interface{}) HTMLBdo // OnCut calls the given handler when the user cuts the content of an element. OnCut(h EventHandler, scope ...interface{}) HTMLBdo // OnDblClick calls the given handler when there is a mouse double-click on the element. OnDblClick(h EventHandler, scope ...interface{}) HTMLBdo // OnDrag calls the given handler when an element is dragged. OnDrag(h EventHandler, scope ...interface{}) HTMLBdo // OnDragEnd calls the given handler at the end of a drag operation. OnDragEnd(h EventHandler, scope ...interface{}) HTMLBdo // OnDragEnter calls the given handler when an element has been dragged to a valid drop target. OnDragEnter(h EventHandler, scope ...interface{}) HTMLBdo // OnDragLeave calls the given handler when an element leaves a valid drop target. OnDragLeave(h EventHandler, scope ...interface{}) HTMLBdo // OnDragOver calls the given handler when an element is being dragged over a valid drop target. OnDragOver(h EventHandler, scope ...interface{}) HTMLBdo // OnDragStart calls the given handler at the start of a drag operation. OnDragStart(h EventHandler, scope ...interface{}) HTMLBdo // OnDrop calls the given handler when dragged element is being dropped. OnDrop(h EventHandler, scope ...interface{}) HTMLBdo // OnFocus calls the given handler when the element gets focus. OnFocus(h EventHandler, scope ...interface{}) HTMLBdo // OnInput calls the given handler when an element gets user input. OnInput(h EventHandler, scope ...interface{}) HTMLBdo // OnInvalid calls the given handler when an element is invalid. OnInvalid(h EventHandler, scope ...interface{}) HTMLBdo // OnKeyDown calls the given handler when a user is pressing a key. OnKeyDown(h EventHandler, scope ...interface{}) HTMLBdo // OnKeyPress calls the given handler when a user presses a key. OnKeyPress(h EventHandler, scope ...interface{}) HTMLBdo // OnKeyup calls the given handler when a user releases a key. OnKeyup(h EventHandler, scope ...interface{}) HTMLBdo // OnMouseDown calls the given handler when a mouse button is pressed down on an element. OnMouseDown(h EventHandler, scope ...interface{}) HTMLBdo // OnMouseMove calls the given handler when the mouse pointer is moving while it is over an element. OnMouseMove(h EventHandler, scope ...interface{}) HTMLBdo // OnMouseOut calls the given handler when the mouse pointer moves out of an element. OnMouseOut(h EventHandler, scope ...interface{}) HTMLBdo // OnMouseOver calls the given handler when the mouse pointer moves over an element. OnMouseOver(h EventHandler, scope ...interface{}) HTMLBdo // OnMouseUp calls the given handler when a mouse button is released over an element. OnMouseUp(h EventHandler, scope ...interface{}) HTMLBdo // OnPaste calls the given handler when the user pastes some content in an element. OnPaste(h EventHandler, scope ...interface{}) HTMLBdo // OnReset calls the given handler when the Reset button in a form is clicked. OnReset(h EventHandler, scope ...interface{}) HTMLBdo // OnScroll calls the given handler when an element's scrollbar is being scrolled. OnScroll(h EventHandler, scope ...interface{}) HTMLBdo // OnSearch calls the given handler when the user writes something in a search field. OnSearch(h EventHandler, scope ...interface{}) HTMLBdo // OnSelect calls the given handler after some text has been selected in an element. OnSelect(h EventHandler, scope ...interface{}) HTMLBdo // OnSubmit calls the given handler when a form is submitted. OnSubmit(h EventHandler, scope ...interface{}) HTMLBdo // OnWheel calls the given handler when the mouse wheel rolls up or down over an element. OnWheel(h EventHandler, scope ...interface{}) HTMLBdo }
HTMLBdo is the interface that describes a <bdo> HTML element.
type HTMLBlockquote ¶
type HTMLBlockquote interface { UI // Body set the content of the element. Body(elems ...UI) HTMLBlockquote // Text sets the content of the element with a text node containing the stringified given value. Text(v interface{}) HTMLBlockquote // AccessKey specifies a shortcut key to activate/focus an element. AccessKey(v string) HTMLBlockquote // Aria stores accessible rich internet applications (ARIA) data. Aria(k string, v interface{}) HTMLBlockquote // Cite specifies a URL which explains the quote/deleted/inserted text. Cite(v string) HTMLBlockquote // Class specifies one or more classnames for an element (refers to a class in a style sheet). Multiple classnames are space separated. Class(v string) HTMLBlockquote // ContentEditable specifies whether the content of an element is editable or not. ContentEditable(v bool) HTMLBlockquote // DataSet stores custom data private to the page or application. DataSet(k string, v interface{}) HTMLBlockquote // Dir specifies the text direction for the content in an element. Dir(v string) HTMLBlockquote // Draggable specifies whether an element is draggable or not. Draggable(v bool) HTMLBlockquote // Hidden specifies that an element is not yet, or is no longer relevant. Hidden(v bool) HTMLBlockquote // ID specifies a unique id for an element. ID(v string) HTMLBlockquote // Lang specifies the language of the element's content. Lang(v string) HTMLBlockquote // Spellcheck specifies whether the element is to have its spelling and grammar checked or not. Spellcheck(v bool) HTMLBlockquote // Style specifies a CSS style for an element. Can be called multiple times to set multiple css styles. Style(k, v string) HTMLBlockquote // TabIndex specifies the tabbing order of an element. TabIndex(v int) HTMLBlockquote // Title specifies extra information about an element. Title(v string) HTMLBlockquote // OnBlur calls the given handler when the element loses focus. OnBlur(h EventHandler, scope ...interface{}) HTMLBlockquote // OnChange calls the given handler when the value of the element is changed. OnChange(h EventHandler, scope ...interface{}) HTMLBlockquote // OnClick calls the given handler when there is a mouse click on the element. OnClick(h EventHandler, scope ...interface{}) HTMLBlockquote // OnContextMenu calls the given handler when a context menu is triggered. OnContextMenu(h EventHandler, scope ...interface{}) HTMLBlockquote // OnCopy calls the given handler when the user copies the content of an element. OnCopy(h EventHandler, scope ...interface{}) HTMLBlockquote // OnCut calls the given handler when the user cuts the content of an element. OnCut(h EventHandler, scope ...interface{}) HTMLBlockquote // OnDblClick calls the given handler when there is a mouse double-click on the element. OnDblClick(h EventHandler, scope ...interface{}) HTMLBlockquote // OnDrag calls the given handler when an element is dragged. OnDrag(h EventHandler, scope ...interface{}) HTMLBlockquote // OnDragEnd calls the given handler at the end of a drag operation. OnDragEnd(h EventHandler, scope ...interface{}) HTMLBlockquote // OnDragEnter calls the given handler when an element has been dragged to a valid drop target. OnDragEnter(h EventHandler, scope ...interface{}) HTMLBlockquote // OnDragLeave calls the given handler when an element leaves a valid drop target. OnDragLeave(h EventHandler, scope ...interface{}) HTMLBlockquote // OnDragOver calls the given handler when an element is being dragged over a valid drop target. OnDragOver(h EventHandler, scope ...interface{}) HTMLBlockquote // OnDragStart calls the given handler at the start of a drag operation. OnDragStart(h EventHandler, scope ...interface{}) HTMLBlockquote // OnDrop calls the given handler when dragged element is being dropped. OnDrop(h EventHandler, scope ...interface{}) HTMLBlockquote // OnFocus calls the given handler when the element gets focus. OnFocus(h EventHandler, scope ...interface{}) HTMLBlockquote // OnInput calls the given handler when an element gets user input. OnInput(h EventHandler, scope ...interface{}) HTMLBlockquote // OnInvalid calls the given handler when an element is invalid. OnInvalid(h EventHandler, scope ...interface{}) HTMLBlockquote // OnKeyDown calls the given handler when a user is pressing a key. OnKeyDown(h EventHandler, scope ...interface{}) HTMLBlockquote // OnKeyPress calls the given handler when a user presses a key. OnKeyPress(h EventHandler, scope ...interface{}) HTMLBlockquote // OnKeyup calls the given handler when a user releases a key. OnKeyup(h EventHandler, scope ...interface{}) HTMLBlockquote // OnMouseDown calls the given handler when a mouse button is pressed down on an element. OnMouseDown(h EventHandler, scope ...interface{}) HTMLBlockquote // OnMouseMove calls the given handler when the mouse pointer is moving while it is over an element. OnMouseMove(h EventHandler, scope ...interface{}) HTMLBlockquote // OnMouseOut calls the given handler when the mouse pointer moves out of an element. OnMouseOut(h EventHandler, scope ...interface{}) HTMLBlockquote // OnMouseOver calls the given handler when the mouse pointer moves over an element. OnMouseOver(h EventHandler, scope ...interface{}) HTMLBlockquote // OnMouseUp calls the given handler when a mouse button is released over an element. OnMouseUp(h EventHandler, scope ...interface{}) HTMLBlockquote // OnPaste calls the given handler when the user pastes some content in an element. OnPaste(h EventHandler, scope ...interface{}) HTMLBlockquote // OnReset calls the given handler when the Reset button in a form is clicked. OnReset(h EventHandler, scope ...interface{}) HTMLBlockquote // OnScroll calls the given handler when an element's scrollbar is being scrolled. OnScroll(h EventHandler, scope ...interface{}) HTMLBlockquote // OnSearch calls the given handler when the user writes something in a search field. OnSearch(h EventHandler, scope ...interface{}) HTMLBlockquote // OnSelect calls the given handler after some text has been selected in an element. OnSelect(h EventHandler, scope ...interface{}) HTMLBlockquote // OnSubmit calls the given handler when a form is submitted. OnSubmit(h EventHandler, scope ...interface{}) HTMLBlockquote // OnWheel calls the given handler when the mouse wheel rolls up or down over an element. OnWheel(h EventHandler, scope ...interface{}) HTMLBlockquote }
HTMLBlockquote is the interface that describes a <blockquote> HTML element.
func Blockquote ¶
func Blockquote() HTMLBlockquote
Blockquote returns an HTML element that defines a section that is quoted from another source.
type HTMLBody ¶
type HTMLBody interface { UI // Body set the content of the element. Body(elems ...UI) HTMLBody // Text sets the content of the element with a text node containing the stringified given value. Text(v interface{}) HTMLBody // AccessKey specifies a shortcut key to activate/focus an element. AccessKey(v string) HTMLBody // Aria stores accessible rich internet applications (ARIA) data. Aria(k string, v interface{}) HTMLBody // Class specifies one or more classnames for an element (refers to a class in a style sheet). Multiple classnames are space separated. Class(v string) HTMLBody // ContentEditable specifies whether the content of an element is editable or not. ContentEditable(v bool) HTMLBody // DataSet stores custom data private to the page or application. DataSet(k string, v interface{}) HTMLBody // Dir specifies the text direction for the content in an element. Dir(v string) HTMLBody // Draggable specifies whether an element is draggable or not. Draggable(v bool) HTMLBody // Hidden specifies that an element is not yet, or is no longer relevant. Hidden(v bool) HTMLBody // ID specifies a unique id for an element. ID(v string) HTMLBody // Lang specifies the language of the element's content. Lang(v string) HTMLBody // Spellcheck specifies whether the element is to have its spelling and grammar checked or not. Spellcheck(v bool) HTMLBody // Style specifies a CSS style for an element. Can be called multiple times to set multiple css styles. Style(k, v string) HTMLBody // TabIndex specifies the tabbing order of an element. TabIndex(v int) HTMLBody // Title specifies extra information about an element. Title(v string) HTMLBody // OnAfterPrint runs the given handler after the document is printed. OnAfterPrint(h EventHandler, scope ...interface{}) HTMLBody // OnBeforePrint calls the given handler before the document is printed. OnBeforePrint(h EventHandler, scope ...interface{}) HTMLBody // OnBeforeUnload calls the given handler when the document is about to be unloaded. OnBeforeUnload(h EventHandler, scope ...interface{}) HTMLBody // OnBlur calls the given handler when the element loses focus. OnBlur(h EventHandler, scope ...interface{}) HTMLBody // OnChange calls the given handler when the value of the element is changed. OnChange(h EventHandler, scope ...interface{}) HTMLBody // OnClick calls the given handler when there is a mouse click on the element. OnClick(h EventHandler, scope ...interface{}) HTMLBody // OnContextMenu calls the given handler when a context menu is triggered. OnContextMenu(h EventHandler, scope ...interface{}) HTMLBody // OnCopy calls the given handler when the user copies the content of an element. OnCopy(h EventHandler, scope ...interface{}) HTMLBody // OnCut calls the given handler when the user cuts the content of an element. OnCut(h EventHandler, scope ...interface{}) HTMLBody // OnDblClick calls the given handler when there is a mouse double-click on the element. OnDblClick(h EventHandler, scope ...interface{}) HTMLBody // OnDrag calls the given handler when an element is dragged. OnDrag(h EventHandler, scope ...interface{}) HTMLBody // OnDragEnd calls the given handler at the end of a drag operation. OnDragEnd(h EventHandler, scope ...interface{}) HTMLBody // OnDragEnter calls the given handler when an element has been dragged to a valid drop target. OnDragEnter(h EventHandler, scope ...interface{}) HTMLBody // OnDragLeave calls the given handler when an element leaves a valid drop target. OnDragLeave(h EventHandler, scope ...interface{}) HTMLBody // OnDragOver calls the given handler when an element is being dragged over a valid drop target. OnDragOver(h EventHandler, scope ...interface{}) HTMLBody // OnDragStart calls the given handler at the start of a drag operation. OnDragStart(h EventHandler, scope ...interface{}) HTMLBody // OnDrop calls the given handler when dragged element is being dropped. OnDrop(h EventHandler, scope ...interface{}) HTMLBody // OnError calls the given handler when an error occurs. OnError(h EventHandler, scope ...interface{}) HTMLBody // OnFocus calls the given handler when the element gets focus. OnFocus(h EventHandler, scope ...interface{}) HTMLBody // OnHashChange calls the given handler when there has been changes to the anchor part of the a URL. OnHashChange(h EventHandler, scope ...interface{}) HTMLBody // OnInput calls the given handler when an element gets user input. OnInput(h EventHandler, scope ...interface{}) HTMLBody // OnInvalid calls the given handler when an element is invalid. OnInvalid(h EventHandler, scope ...interface{}) HTMLBody // OnKeyDown calls the given handler when a user is pressing a key. OnKeyDown(h EventHandler, scope ...interface{}) HTMLBody // OnKeyPress calls the given handler when a user presses a key. OnKeyPress(h EventHandler, scope ...interface{}) HTMLBody // OnKeyup calls the given handler when a user releases a key. OnKeyup(h EventHandler, scope ...interface{}) HTMLBody // OnLoad calls the given handler after the element is finished loading. OnLoad(h EventHandler, scope ...interface{}) HTMLBody // OnMessage calls then given handler when a message is triggered. OnMessage(h EventHandler, scope ...interface{}) HTMLBody // OnMouseDown calls the given handler when a mouse button is pressed down on an element. OnMouseDown(h EventHandler, scope ...interface{}) HTMLBody // OnMouseMove calls the given handler when the mouse pointer is moving while it is over an element. OnMouseMove(h EventHandler, scope ...interface{}) HTMLBody // OnMouseOut calls the given handler when the mouse pointer moves out of an element. OnMouseOut(h EventHandler, scope ...interface{}) HTMLBody // OnMouseOver calls the given handler when the mouse pointer moves over an element. OnMouseOver(h EventHandler, scope ...interface{}) HTMLBody // OnMouseUp calls the given handler when a mouse button is released over an element. OnMouseUp(h EventHandler, scope ...interface{}) HTMLBody // OnOffline calls the given handler when the browser starts to work offline. OnOffline(h EventHandler, scope ...interface{}) HTMLBody // OnOnline calls the given handler when the browser starts to work online. OnOnline(h EventHandler, scope ...interface{}) HTMLBody // OnPageHide calls the given handler when a user navigates away from a page. OnPageHide(h EventHandler, scope ...interface{}) HTMLBody // OnPageShow calls the given handler when a user navigates to a page. OnPageShow(h EventHandler, scope ...interface{}) HTMLBody // OnPaste calls the given handler when the user pastes some content in an element. OnPaste(h EventHandler, scope ...interface{}) HTMLBody // OnPopState calls the given handler when the window's history changes. OnPopState(h EventHandler, scope ...interface{}) HTMLBody // OnReset calls the given handler when the Reset button in a form is clicked. OnReset(h EventHandler, scope ...interface{}) HTMLBody // OnResize calls the given handler when the browser window is resized. OnResize(h EventHandler, scope ...interface{}) HTMLBody // OnScroll calls the given handler when an element's scrollbar is being scrolled. OnScroll(h EventHandler, scope ...interface{}) HTMLBody // OnSearch calls the given handler when the user writes something in a search field. OnSearch(h EventHandler, scope ...interface{}) HTMLBody // OnSelect calls the given handler after some text has been selected in an element. OnSelect(h EventHandler, scope ...interface{}) HTMLBody // OnStorage calls the given handler when a Web Storage area is updated. OnStorage(h EventHandler, scope ...interface{}) HTMLBody // OnSubmit calls the given handler when a form is submitted. OnSubmit(h EventHandler, scope ...interface{}) HTMLBody // OnUnload calls the given handler once a page has unloaded (or the browser window has been closed). OnUnload(h EventHandler, scope ...interface{}) HTMLBody // OnWheel calls the given handler when the mouse wheel rolls up or down over an element. OnWheel(h EventHandler, scope ...interface{}) HTMLBody }
HTMLBody is the interface that describes a <body> HTML element.
type HTMLBr ¶
type HTMLBr interface { UI // AccessKey specifies a shortcut key to activate/focus an element. AccessKey(v string) HTMLBr // Aria stores accessible rich internet applications (ARIA) data. Aria(k string, v interface{}) HTMLBr // Class specifies one or more classnames for an element (refers to a class in a style sheet). Multiple classnames are space separated. Class(v string) HTMLBr // ContentEditable specifies whether the content of an element is editable or not. ContentEditable(v bool) HTMLBr // DataSet stores custom data private to the page or application. DataSet(k string, v interface{}) HTMLBr // Dir specifies the text direction for the content in an element. Dir(v string) HTMLBr // Draggable specifies whether an element is draggable or not. Draggable(v bool) HTMLBr // Hidden specifies that an element is not yet, or is no longer relevant. Hidden(v bool) HTMLBr // ID specifies a unique id for an element. ID(v string) HTMLBr // Lang specifies the language of the element's content. Lang(v string) HTMLBr // Spellcheck specifies whether the element is to have its spelling and grammar checked or not. Spellcheck(v bool) HTMLBr // Style specifies a CSS style for an element. Can be called multiple times to set multiple css styles. Style(k, v string) HTMLBr // TabIndex specifies the tabbing order of an element. TabIndex(v int) HTMLBr // Title specifies extra information about an element. Title(v string) HTMLBr // OnBlur calls the given handler when the element loses focus. OnBlur(h EventHandler, scope ...interface{}) HTMLBr // OnChange calls the given handler when the value of the element is changed. OnChange(h EventHandler, scope ...interface{}) HTMLBr // OnClick calls the given handler when there is a mouse click on the element. OnClick(h EventHandler, scope ...interface{}) HTMLBr // OnContextMenu calls the given handler when a context menu is triggered. OnContextMenu(h EventHandler, scope ...interface{}) HTMLBr // OnCopy calls the given handler when the user copies the content of an element. OnCopy(h EventHandler, scope ...interface{}) HTMLBr // OnCut calls the given handler when the user cuts the content of an element. OnCut(h EventHandler, scope ...interface{}) HTMLBr // OnDblClick calls the given handler when there is a mouse double-click on the element. OnDblClick(h EventHandler, scope ...interface{}) HTMLBr // OnDrag calls the given handler when an element is dragged. OnDrag(h EventHandler, scope ...interface{}) HTMLBr // OnDragEnd calls the given handler at the end of a drag operation. OnDragEnd(h EventHandler, scope ...interface{}) HTMLBr // OnDragEnter calls the given handler when an element has been dragged to a valid drop target. OnDragEnter(h EventHandler, scope ...interface{}) HTMLBr // OnDragLeave calls the given handler when an element leaves a valid drop target. OnDragLeave(h EventHandler, scope ...interface{}) HTMLBr // OnDragOver calls the given handler when an element is being dragged over a valid drop target. OnDragOver(h EventHandler, scope ...interface{}) HTMLBr // OnDragStart calls the given handler at the start of a drag operation. OnDragStart(h EventHandler, scope ...interface{}) HTMLBr // OnDrop calls the given handler when dragged element is being dropped. OnDrop(h EventHandler, scope ...interface{}) HTMLBr // OnFocus calls the given handler when the element gets focus. OnFocus(h EventHandler, scope ...interface{}) HTMLBr // OnInput calls the given handler when an element gets user input. OnInput(h EventHandler, scope ...interface{}) HTMLBr // OnInvalid calls the given handler when an element is invalid. OnInvalid(h EventHandler, scope ...interface{}) HTMLBr // OnKeyDown calls the given handler when a user is pressing a key. OnKeyDown(h EventHandler, scope ...interface{}) HTMLBr // OnKeyPress calls the given handler when a user presses a key. OnKeyPress(h EventHandler, scope ...interface{}) HTMLBr // OnKeyup calls the given handler when a user releases a key. OnKeyup(h EventHandler, scope ...interface{}) HTMLBr // OnMouseDown calls the given handler when a mouse button is pressed down on an element. OnMouseDown(h EventHandler, scope ...interface{}) HTMLBr // OnMouseMove calls the given handler when the mouse pointer is moving while it is over an element. OnMouseMove(h EventHandler, scope ...interface{}) HTMLBr // OnMouseOut calls the given handler when the mouse pointer moves out of an element. OnMouseOut(h EventHandler, scope ...interface{}) HTMLBr // OnMouseOver calls the given handler when the mouse pointer moves over an element. OnMouseOver(h EventHandler, scope ...interface{}) HTMLBr // OnMouseUp calls the given handler when a mouse button is released over an element. OnMouseUp(h EventHandler, scope ...interface{}) HTMLBr // OnPaste calls the given handler when the user pastes some content in an element. OnPaste(h EventHandler, scope ...interface{}) HTMLBr // OnReset calls the given handler when the Reset button in a form is clicked. OnReset(h EventHandler, scope ...interface{}) HTMLBr // OnScroll calls the given handler when an element's scrollbar is being scrolled. OnScroll(h EventHandler, scope ...interface{}) HTMLBr // OnSearch calls the given handler when the user writes something in a search field. OnSearch(h EventHandler, scope ...interface{}) HTMLBr // OnSelect calls the given handler after some text has been selected in an element. OnSelect(h EventHandler, scope ...interface{}) HTMLBr // OnSubmit calls the given handler when a form is submitted. OnSubmit(h EventHandler, scope ...interface{}) HTMLBr // OnWheel calls the given handler when the mouse wheel rolls up or down over an element. OnWheel(h EventHandler, scope ...interface{}) HTMLBr }
HTMLBr is the interface that describes a <br> HTML element.
type HTMLButton ¶
type HTMLButton interface { UI // Body set the content of the element. Body(elems ...UI) HTMLButton // Text sets the content of the element with a text node containing the stringified given value. Text(v interface{}) HTMLButton // AccessKey specifies a shortcut key to activate/focus an element. AccessKey(v string) HTMLButton // Aria stores accessible rich internet applications (ARIA) data. Aria(k string, v interface{}) HTMLButton // AutoFocus specifies that the element should automatically get focus when the page loads. AutoFocus(v bool) HTMLButton // Class specifies one or more classnames for an element (refers to a class in a style sheet). Multiple classnames are space separated. Class(v string) HTMLButton // ContentEditable specifies whether the content of an element is editable or not. ContentEditable(v bool) HTMLButton // DataSet stores custom data private to the page or application. DataSet(k string, v interface{}) HTMLButton // Dir specifies the text direction for the content in an element. Dir(v string) HTMLButton // Disabled specifies that the specified element/group of elements should be disabled. Disabled(v bool) HTMLButton // Draggable specifies whether an element is draggable or not. Draggable(v bool) HTMLButton // Form specifies the name of the form the element belongs to. Form(v string) HTMLButton // FormAction specifies where to send the form-data when a form is submitted. Only for submit type. FormAction(v string) HTMLButton // FormEncType specifies how form-data should be encoded before sending it to a server. Only for submit type. FormEncType(v string) HTMLButton // FormMethod specifies how to send the form-data (which HTTP method to use). Only for submit type. FormMethod(v string) HTMLButton // FormNoValidate specifies that the form-data should not be validated on submission. Only for submit type. FormNoValidate(v bool) HTMLButton // FormTarget specifies where to display the response after submitting the form. Only for submit type. FormTarget(v string) HTMLButton // Hidden specifies that an element is not yet, or is no longer relevant. Hidden(v bool) HTMLButton // ID specifies a unique id for an element. ID(v string) HTMLButton // Lang specifies the language of the element's content. Lang(v string) HTMLButton // Name specifies the name of the element. Name(v string) HTMLButton // Spellcheck specifies whether the element is to have its spelling and grammar checked or not. Spellcheck(v bool) HTMLButton // Style specifies a CSS style for an element. Can be called multiple times to set multiple css styles. Style(k, v string) HTMLButton // TabIndex specifies the tabbing order of an element. TabIndex(v int) HTMLButton // Title specifies extra information about an element. Title(v string) HTMLButton // Type specifies the type of element. Type(v string) HTMLButton // Value specifies the value of the element. Value(v interface{}) HTMLButton // OnBlur calls the given handler when the element loses focus. OnBlur(h EventHandler, scope ...interface{}) HTMLButton // OnChange calls the given handler when the value of the element is changed. OnChange(h EventHandler, scope ...interface{}) HTMLButton // OnClick calls the given handler when there is a mouse click on the element. OnClick(h EventHandler, scope ...interface{}) HTMLButton // OnContextMenu calls the given handler when a context menu is triggered. OnContextMenu(h EventHandler, scope ...interface{}) HTMLButton // OnCopy calls the given handler when the user copies the content of an element. OnCopy(h EventHandler, scope ...interface{}) HTMLButton // OnCut calls the given handler when the user cuts the content of an element. OnCut(h EventHandler, scope ...interface{}) HTMLButton // OnDblClick calls the given handler when there is a mouse double-click on the element. OnDblClick(h EventHandler, scope ...interface{}) HTMLButton // OnDrag calls the given handler when an element is dragged. OnDrag(h EventHandler, scope ...interface{}) HTMLButton // OnDragEnd calls the given handler at the end of a drag operation. OnDragEnd(h EventHandler, scope ...interface{}) HTMLButton // OnDragEnter calls the given handler when an element has been dragged to a valid drop target. OnDragEnter(h EventHandler, scope ...interface{}) HTMLButton // OnDragLeave calls the given handler when an element leaves a valid drop target. OnDragLeave(h EventHandler, scope ...interface{}) HTMLButton // OnDragOver calls the given handler when an element is being dragged over a valid drop target. OnDragOver(h EventHandler, scope ...interface{}) HTMLButton // OnDragStart calls the given handler at the start of a drag operation. OnDragStart(h EventHandler, scope ...interface{}) HTMLButton // OnDrop calls the given handler when dragged element is being dropped. OnDrop(h EventHandler, scope ...interface{}) HTMLButton // OnFocus calls the given handler when the element gets focus. OnFocus(h EventHandler, scope ...interface{}) HTMLButton // OnInput calls the given handler when an element gets user input. OnInput(h EventHandler, scope ...interface{}) HTMLButton // OnInvalid calls the given handler when an element is invalid. OnInvalid(h EventHandler, scope ...interface{}) HTMLButton // OnKeyDown calls the given handler when a user is pressing a key. OnKeyDown(h EventHandler, scope ...interface{}) HTMLButton // OnKeyPress calls the given handler when a user presses a key. OnKeyPress(h EventHandler, scope ...interface{}) HTMLButton // OnKeyup calls the given handler when a user releases a key. OnKeyup(h EventHandler, scope ...interface{}) HTMLButton // OnMouseDown calls the given handler when a mouse button is pressed down on an element. OnMouseDown(h EventHandler, scope ...interface{}) HTMLButton // OnMouseMove calls the given handler when the mouse pointer is moving while it is over an element. OnMouseMove(h EventHandler, scope ...interface{}) HTMLButton // OnMouseOut calls the given handler when the mouse pointer moves out of an element. OnMouseOut(h EventHandler, scope ...interface{}) HTMLButton // OnMouseOver calls the given handler when the mouse pointer moves over an element. OnMouseOver(h EventHandler, scope ...interface{}) HTMLButton // OnMouseUp calls the given handler when a mouse button is released over an element. OnMouseUp(h EventHandler, scope ...interface{}) HTMLButton // OnPaste calls the given handler when the user pastes some content in an element. OnPaste(h EventHandler, scope ...interface{}) HTMLButton // OnReset calls the given handler when the Reset button in a form is clicked. OnReset(h EventHandler, scope ...interface{}) HTMLButton // OnScroll calls the given handler when an element's scrollbar is being scrolled. OnScroll(h EventHandler, scope ...interface{}) HTMLButton // OnSearch calls the given handler when the user writes something in a search field. OnSearch(h EventHandler, scope ...interface{}) HTMLButton // OnSelect calls the given handler after some text has been selected in an element. OnSelect(h EventHandler, scope ...interface{}) HTMLButton // OnSubmit calls the given handler when a form is submitted. OnSubmit(h EventHandler, scope ...interface{}) HTMLButton // OnWheel calls the given handler when the mouse wheel rolls up or down over an element. OnWheel(h EventHandler, scope ...interface{}) HTMLButton }
HTMLButton is the interface that describes a <button> HTML element.
func Button ¶
func Button() HTMLButton
Button returns an HTML element that defines a clickable button.
type HTMLCanvas ¶