Members
-
container :external:Element
-
Details
-
id :string
-
Details
-
logger :NexusHoratio.base.Logger
-
Details
-
name :string
-
Details
-
visible :boolean
-
Details
Methods
-
build() → {NexusHoratio.widget.Widget}
-
Description
Materialize the contents into the container.
Each time this is called, the Widget should repopulate the contents.
Returns
Fires
Details
-
destroy() → {NexusHoratio.widget.Widget}
-
Description
Tears down internals. E.g., any Widget that has other Widgets should call their destroy() method as well.
Returns
Fires
Details
-
show() → {NexusHoratio.widget.Widget}
-
Description
Shows the Widget by removing a CSS class.
Returns
Fires
Details
-
hide() → {NexusHoratio.widget.Widget}
-
Description
Hides the Widget by adding a CSS class.
Returns
Fires
Details
-
verify() → {NexusHoratio.widget.Widget}
-
Description
Verifies a Widget's internal state.
For example, a Widget may use this to enforce certain ARIA criteria.
Returns
Fires
Details
-
clear()
-
Description
Clears the container element.
Details
-
on( eventType, func ) → {NexusHoratio.widget.Widget}
-
Description
Attach a function to an eventType.
Parameters
Name Type Description eventTypestring Event type to connect with.
funcNexusHoratio.base.Dispatcher~Handler Single argument function to call.
Returns
Details
-
off( eventType, func ) → {NexusHoratio.widget.Widget}
-
Description
Remove all instances of a function registered to an eventType.
Parameters
Name Type Description eventTypestring Event type to disconnect from.
funcNexusHoratio.base.Dispatcher~Handler Function to remove.
Returns
Details
-
attrText( attr, value ) → {NexusHoratio.widget.Widget}
-
Description
Helper that sets an attribute to value.
If value is null, the attribute is removed.
Parameters
Name Type Attributes Description attrstring Name of the attribute.
valuestring <nullable> Value to assign.
Returns
Examples
w.attrText('aria-label', 'Information about the application.')Details
-
attrElements( attr, ...values ) → {NexusHoratio.widget.Widget}
-
Description
Helper that sets an attribute to space separated
Elementids.This will collect the appropriate id from each value passed then assign that collection to the attribute. If any value is null, the everything up to that point will be reset. If the collection ends up being empty (e.g., no values were passed or the last was null), the attribute will be removed.
Parameters
Name Type Attributes Description attrstring Name of the attribute.
valuesNexusHoratio.widget~Content <nullable>
<repeatable>Value to assign.
Returns
Details
-
installStyle( id, rules ) → {external:HTMLStyleElement}
-
Description
Install a style if not already present.
It will NOT overwrite an existing one.
Parameters
Name Type Description idstring Base to use for the style id.
rulesArray.<string> CSS rules in 'selector { declarations }'.
Returns
Details
-
addSection( section ) → {external:Element}
-
Description
This becomes the current section.
Parameters
Name Type Description sectionstring Name of the new section.
Returns
Details
-
addHeader( ...items )
-
Description
Add a row of header cells to the current section.
Parameters
Name Type Attributes Description itemsstring <repeatable> To make up the row cells.
Details
-
addData( ...items )
-
Description
Add a row of data cells to the current section.
Parameters
Name Type Attributes Description itemsstring <repeatable> To make up the row cells.
Details
-
<private> addRow( type, ...items )
-
Description
Add a row to the current section.
Parameters
Name Type Attributes Description typestring Cell type, typically 'td' or 'th'.
itemsstring <repeatable> To make up the row cells.
Details
Events
-
build
-
Details
-
built
-
Details
-
verify
-
Details
-
verified
-
Details
-
destroy
-
Details
-
destroyed
-
Details
-
show
-
Details
-
showed
-
Details
-
hide
-
Details
-
hidden
-
Details