10/29/2012

Bubbling in Enyo2, Part 3

Our first example was a simple event bubble from a button to a parent object.  The second example re-used the button object within two separate parents that handled the bubbled event differently.  Let's go one step farther.  This time the button's event will bubble all the way up the parent hierarchy.


10/21/2012

Bubbling in Enyo2, Part 2

We looked at a simple example in Part 1. A button component sent an event up the object hierarchy until it was captured by the App kind and resolved. Wouldn't it be great if we could use the same BubbleButton kind in 2 different hierarchies and get 2 different results? Yes it would; so let's do that.

10/15/2012

Bubbling in Enyo2, Part 1

"Bubble, bubble, toil and trouble" cry the witches of Macbeth.  Clearly, they never tried using Enyo 2 as their JavaScript framework or it would have been "Bubble, bubble, yahoo!".  The event bubbling system is one of the features that makes Enyo 2 feel so powerful.

The bubble method allows events to be sent up the object hierarchy.  This is not the same thing as bubbling up the DOM.  The object structure that is in memory can be similar to the DOM, but the process will only work against the object hierarchy.  Changes to the DOM will need to be rendered separately.