Skip to content

v0.9.0 - Enable custom elements inside custom elements

Pre-release
Pre-release

Choose a tag to compare

@staltz staltz released this 12 Jan 20:23
· 3132 commits to master since this release

Fixes bug where custom elements couldn't be used inside custom elements #64

Breaking change to the API related to custom elements

Register the custom element on Cycle object, not on the Renderer:

// v0.8.x (before)
var renderer = Cycle.createRenderer('.container');
renderer.registerCustomElement('mybutton', dataFlowNode);

// v0.9.0 (now)
Cycle.registerCustomElement('mybutton', dataFlowNode);

This change should persist also when HTMLRenderer arrives, for server-side rendering. Cycle.registerCustomElement() will instruct all instances of Renderer and all instances of HTMLRenderer to replace the tagName with the dataFlowNode implementation.