It's late March and we're pleased to release the third beta version of Enyo 2.0. Here's a summary of changes in the core Enyo code along with the bundled libraries like Onyx and layout.
For Enyo, one big change is the reintroduction of "allowHtml" into enyo.Control. When it's false (the default value), the "content" is considered to be plain text and any HTML is escaped when the DOM node is rendered. This is primarily for security reasons; you should only set "allowHtml" when you directly control the content or you can be sure it doesn't contain any malicious elements.
Other changes include:
enyo.now()returns the current time
enyo.Component.createComponentsnow returns an array of the created items
enyo.Controlnow has a
noDomattribute that can be set to true to avoid having it create a DOM node. This is useful for containers that hold other controls, but shouldn't be represented in the output directly.
enyo.jobhas been moved into the core code from the extra library
<textarea>HTML element instead.
enyo.Inputnow supports a
typeproperty that's mapped to the HTML 5 type attribute
<script>tag; before only "package.js" with no prefix was allowed
flickevent now has coordinates of the start of the flick, not the end
onreleaseevent occurs only if a small hysteresis is satisfied
enyo.Control.renderInto()now setup the document
<body>element to be able to properly host fitted content.
enyo.Scroller: changed horizontal/vertical settings so they make more sense, window scrolling is now prevented on iOS when using a native touch region scroller and dragging beyond a scroll boundary.
enyo.Scroller.scrollTo()method now animates when using a TouchScrollStrategy.
enyo.macroizewas optimized and a sister method,
enyo.quickMacroize()was added that's faster but more limited.
For Onyx, there are several new controls:
onyx.Slider: an input that lets you pick a value from a range
onyx.ProgressBar: read-only controls showing a variable value
onyx.ProgressButton: progress bars with an internal cancel icon
onyx.TextArea: Onyx styling around enyo.TextArea
onyx.RichEdit: Onyx styling around enyo.RichEdit
Also changed in Onyx:
enyo.path.rewriteto rewrite the src value so you can use aliases
The layout Fittable library has been refactored extensively with one API-visible change: the
stretch has changed to
noStretch and now defaults to false. When this is true,
the box will have a natural height or width instead of being stretched to fill the space.
For example, if you have a column of buttons in a FittableRows type, they would be stretched out
horizontally to fill the space unless noStretch was set to true on them.
The Fittable library now had additional examples included to show how the various properties and kinds interact.
Last edited by azakus,