html-simple-frontend-framework var element = html(`<div> <input data="title"> <button child="submit">submit</button> </div>`).ext((data,child)=>{ var {submit} = child submit.on('click',()=>{ console.log(data) }) })