Download - Making ember-wormhole work with Fastboot
How ember-wormhole works
• in didInsertElement:
• reads the firstChild and lastChild from this.element
• find destinationElement via document.getElementById
• relocate nodes between first/last child to destinationElement
Fastboot
• No `didInsertElement`
• Component hooks that are called:
• didReceiveAttrs, didUpdateAttrs,willRender, willUpdate
ember-wormhole+Fastboot issues
• in didInsertElement:
• reads the firstChild and lastChild from this.element
• find destinationElement via document.getElementById
• relocate nodes between first/last child to destinationElement
ember-wormhole+Fastboot issues
• no `this.element`. Place head/tail nodes manually.
component#init
ember-wormhole.hbs
Demo
demo: application.hbs
demo: application.hbs
Demo
demo: application.hbs
demo: application.hbs
Links• ember-wormhole
• ember-wormhole demo
• ember-wormhole+fastboot demo
• PR to add Fastboot compat
• ember code:
• env.destinedForDOM check: component-node-manager.js
• InertRenderer