max-mapper / yo-yo

A tiny library for building modular UI components using DOM diffing and ES6 tagged template literals

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

morphdom hooks/opts don't work with requireBin

SilentCicero opened this issue · comments

commented
var yo = require('yo-yo')

function render (content) {
  return yo`<h1>${content}</h1>`
}

var el = render ("Header 1")

yo.update(el, render("Header 2"), {onElUpdated: function(){
  console.log('updated!')
}})

document.body.appendChild(el)

The "onElUpdated" hook is not being fired on requireBin.. it may be something to do with browserified morphdom, not sure though

@maxogden thoughts?

I believe it's because the version requirebin has cached doesn't contain the latest version of morphdom in which that hook was added morphdom@1.3.0. It should work locally and eventually in requirebin when the cache invalidates.

Someone with access to the cache could probably give it a kick though.

commented

@shama awesome, I'm glad that's all it is

Closing as they should work now. Thanks!