Documentation
¶
Index ¶
- Constants
- func DefaultSelectedIndex(selectNode *uinode.Node) int
- func FormOwner(node *uinode.Node) *uinode.Node
- func HasDirtySelectedOption(selectNode *uinode.Node) bool
- func HasInputType(node *uinode.Node, inputType string) bool
- func InitializeDocument(root *uinode.Node, visit func(*uinode.Node), keep func(*uinode.Node) bool)
- func InitializeElementStates(root *uinode.Node)
- func IsChecked(node *uinode.Node) bool
- func IsContentEditable(node *uinode.Node) bool
- func IsDisabled(node *uinode.Node) bool
- func IsEditingHost(node *uinode.Node) bool
- func IsPlaceholderShown(node *uinode.Node) bool
- func ResetForm(form *uinode.Node) bool
- func SameRadioGroup(left, right *uinode.Node) bool
- func SelectedIndex(selectNode *uinode.Node) int
- func SetLiveValue(node *uinode.Node, value string, dirty bool)
- func SetOptionSelected(option *uinode.Node, selected bool) bool
- func SetOptionSelectedAt(selectNode *uinode.Node, optionIndex int, selected bool) bool
- func SetSelectedIndex(selectNode *uinode.Node, selected int)
- func SetSelectedRange(selectNode *uinode.Node, start, end int) bool
- func SupportsDisabled(node *uinode.Node) bool
- func SupportsPlaceholder(node *uinode.Node) bool
- func SynchronizeCheckedAttribute(node *uinode.Node, present bool)
- func SynchronizePlaceholderAttribute(node *uinode.Node)
- func SynchronizeSelectAttribute(selectNode *uinode.Node, name string)
- func SynchronizeSelectChildren(node *uinode.Node)
- func SynchronizeSelectedAttribute(option *uinode.Node, present bool)
- func SynchronizeTextContent(node *uinode.Node)
- func SynchronizeValueAttribute(node *uinode.Node)
- func TabIndex(node *uinode.Node) (int, bool)
Constants ¶
const ( StateChecked = 1 << iota StatePlaceholderShown StateIndeterminate StateDirtyChecked StateValueEmpty StateDirtyValue StateDirtySelected )
Variables ¶
This section is empty.
Functions ¶
func DefaultSelectedIndex ¶
DefaultSelectedIndex returns the effective selection produced by resetting the select from its authored option attributes.
func FormOwner ¶
FormOwner returns the form associated with a form control. An explicit form attribute takes precedence over the nearest ancestor form.
func HasDirtySelectedOption ¶
func InitializeDocument ¶
InitializeDocument sets document order and form state. Visit observes each retained node in preorder. Keep can inspect and exclude a child before its subtree is initialized. Removed metadata can be consumed by Keep.
func InitializeElementStates ¶
func IsContentEditable ¶
IsContentEditable resolves the enumerated contenteditable attribute through the element's ancestors.
func IsDisabled ¶
func IsEditingHost ¶
IsEditingHost reports whether node starts a contenteditable region. Nested editable descendants are not independent sequential focus targets.
func IsPlaceholderShown ¶
func ResetForm ¶
ResetForm restores controls owned by form to their authored defaults. The traversal includes controls associated through an explicit form attribute.
func SameRadioGroup ¶
func SelectedIndex ¶
SelectedIndex returns the first live selected option in tree order.
func SetLiveValue ¶
SetLiveValue updates the compact value state used by :placeholder-shown. The string itself remains owned by the generated form control.
func SetOptionSelected ¶
SetOptionSelected updates one option's selectedness as the selected IDL property does. A single-select keeps at most one selected option.
func SetOptionSelectedAt ¶
func SetSelectedIndex ¶
SetSelectedIndex updates live option selectedness. The selected option gets a dirty flag; options deselected as a consequence retain their dirtyness.
func SetSelectedRange ¶
SetSelectedRange applies a user range selection to a multiple select in one mutation pass. Disabled options retain their selectedness because keyboard and pointer input cannot toggle them.
func SupportsDisabled ¶
func SupportsPlaceholder ¶
func SynchronizeCheckedAttribute ¶
SynchronizeCheckedAttribute applies a checked content-attribute mutation to live checkedness while the control's dirty checkedness flag is clear.
func SynchronizeSelectAttribute ¶
SynchronizeSelectAttribute applies multiple/size mutations to live selectedness using the select element's normalization rules.
func SynchronizeSelectChildren ¶
SynchronizeSelectChildren normalizes live selection after an option list changes. Keep the last selected option without resetting defaults or dirtyness.
func SynchronizeSelectedAttribute ¶
SynchronizeSelectedAttribute applies an option selected content-attribute mutation unless that option's live selectedness is dirty.
func SynchronizeTextContent ¶
SynchronizeTextContent updates a textarea's live value state from its child text while the dirty value flag is clear.
func SynchronizeValueAttribute ¶
SynchronizeValueAttribute updates live value state from an input value content attribute while the dirty value flag is clear.
Types ¶
This section is empty.