maquette

Render Maquette without the Projector

陌路散爱 提交于 2020-01-06 19:51:29
问题 I want to use Maquette as a basic hyperscript language. Consequently, I don't want to use the maquette.projector . However, I'm having a hard time getting any of the maquette.dom functions to work. var h = maquette.h; var dom = maquette.dom; var svg = h('div.sweet', [ h('svg', [ h('circle', { cx: '2cm', cy: '2cm', r: '4cm', fill: 'red' }), ]) ]); document.addEventListener('DOMContentLoaded', function () { console.log(svg); var root = dom.create(svg).domNode; }); <script src="//cdnjs

How to utilize external libraries w/ Maquette.js?

丶灬走出姿态 提交于 2020-01-04 06:52:20
问题 Question: How do I use an external library like tether.js with Maquette.js? My main issue is if I initialize it somewhere in my render function I don't know where I could tear it down , causing a memory leak over time as elements are re-rendered. I experimented with using enterAnimation and exitAnimation as lifecycle hooks, but quickly ran into the cannot change event handler error, as I need to access a specific instance of Tether that is unique to that item. Thoughts? Help? Thanks!