YngwieMVC.View
Class that implements a "view" for abstracting elements of a client-side user interface.
Property | Type | Description |
---|---|---|
_elem | yngwieElement | yngwieElement of view |
_fns | [yngwieElement -> yngwieElement] | Functions that are applied to yngwieElement of view when view is rendered |
_node | ELEMENT | Stores reference to rendered view |
_children | [yngwieView] | Child views of this view |
Creates instance of yngwieView with the given yngwieElement stored as it's element.
yngwieView.elem :: VOID|yngwieElement|STRING, STRING, OBJECT, STRING, [yngwieListener] -> yngwieElement|yngwieView|yngwieView
Setter/getter method for yngwieElement stored by view. Getting the yngiweElement stored by view will apply every stored "modifier" function to that yngwieElement.
Adds function to apply to yngwieElement when view is retrieved or rendered.
Initializes yngwieListener for yngwieElement stored by view.
Modifies element of view to show given text.
Appends another yngwieView to this view. Throws a yngwieError exception if given argument is not a yngwieView.
Appends an array of yngwieViews to this view. Throws a yngwieError exception if given argument is not an ARRAY.
Creates and returns rendered ELEMENT from view, storing result of render.
Re-renders view using stored node. If no node has been stored, then a yngwieError is thrown.
Empties content of given target and appends it with rendered node.
Static factory method for YngwieView.
Return TRUE if given value is an instance of YngwieView.
Returns NODE for given target and context. Throw yngwieError exception if value cannot be set as NODE.
Renders given view and all of it children using given target and context.