README revision dc56725840a5725bb87cdd6c4073bf04d63e6b78
Development Master
* Removed parentNode.inDoc() check from render, to allow implementations
to render to parentNodes which are document fragments. If rendering to
a document fragment, the implementation is responsible for adding the
document fragment to the document during the render lifecycle phase.
* Split widget module into the following sub-modules
- widget-base : Core lifecycle and API support.
- widget-i18n : Internationalization support (WIP).
- widget-htmlparser : HTML parser support.
The "widget" module, rolled up from these submodules is
equivalent to the existing "widget" module
* Removed moveStyles support for 3.1. Can be re-added if required, but
currently does not seem to be in use.
* Made render event fireOnce (along with init and destroy in Base)
* Widget will now fire user-generated events like DOM elements do (e.g.
'click', 'mouseover'). Like all other Widget events, these events are
prefixed with the Widget name (e.g. 'menuitem:click') and the default
context of the event listener will be the Widget that fired the event.
The set of user-generated events published by widget is defined by the
DOM_EVENTS prototype property. Widget developers can use this property to
pair down or extend the number of events.
For performance, these events are only created when someone is listening, and
the actual firing of these events is facilitated by a single, delegated
DOM event listener.
* content box now expands to fill bounding box. CSS is used for browsers
which support box-sizing:border-box. Expansion is handled programmatically
for others (currently IE6 & IE7). Maybe some edge cases which need
resolution.
* Added an "id" attribute.
* Added support for auto-rendering of widgets at the end of construction,
using the "render" attribute.
* Added support for single-box widgets (contentBox and boundingBox can
point to same node).
Widget developers can set CONTENT_TEMPLATE to null if they have a
widget which doesn't need dual-box support.
* Added _bindAttrUI and _syncAttrUI sugar methods, to bind after listeners
and sync methods, by attribute name.
* The widget's bounding box is now removed from the DOM and destroyed
when the widget it destroyed.
* Added "srcNode" attribute, which acts as the root for HTML_PARSER.
This allows widgets to support progressive enhancement, without having
to put the burden on the user to create and point to bounding boxes,
or content boxes.
* Added protected _getSrcNode and _applyParsedConfig methods to allow for
HTML_PARSER customization, by allowing Widget developers to customize
the node passed into _parseNode on the input side, and the final merged
configuration on the output side of the srcNode parsing process.
The default Widget _getSrcNode implementation uses "srcNode" if set,
otherwise falls back to "contentBox", for 3.0.0 compatibility.
The default Widget _applyParsedConfig implementation aggregates the user
configuration literal, with the configuration output from parsed node,
with the user configuration taking precedence.
NOTE: All HTML_PARSER related changes are backward compatible.
Existing Widget impls should still work. However HTML_PARSER
implementations based on contentBox being the root node should be
modified to work off of srcNode before the 3.1 release.
3.0.0
No Changes
3.0.0 beta 1
* PluginHost moved down to Base.
* Render event args added to event facade instead of being passed
across separately (e.parentNode).
* "hasFocus" attribute renamed to "focused"
* "focused" attribute is read only
* "focused" attribute is set via:
- user interaction
- the "focus" and "blur" methods
* Only one DOM focus event handler is used now (two for WebKit) and it is
bound to the widget's ownerDocument. This allows modal widgets to maintain
a reference to the element in the document that previously had focus and
to be able to restore that focus when the modal widget is hidden.
* "tabIndex" attribute was updated
- accepts a number or null
- more documentation
3.0.0PR2 - Initial release
Module Name: "widget"
Documentation: http://developer.yahoo.com/yui/3/widget
Provides the base Widget class along with an augmentable PluginHost
interface.
Widget is the foundation class from which all YUI 3 widgets are derived.
It provides the following pieces of core functionality:
* The render lifecycle method, in addition to the init and destroy
lifecycle methods provided by Base
* Abstract rendering methods to support a consistent MVC structure across
widgets
* A common set of base widget attributes
* Consistent class-name generation support
* Plugin support