This worked with a slight change to the helper:
- can.Mustache.registerHelper("frag", function(frag) {return function(el) {el.parentNode.replaceChild(frag, el);}})