Shopify/batman — pull request #322 by wanderview (2012-02-07 05:34:08+00:00)
Title: Unit test and proposed fix for batman issue #307

This change adds a $cloneNode() function that copies event handlers from the source node to the new node. The Batman.DOM.contentFor() method was updated to use this new $cloneNode() to solve an issue where nested yielded content would have all events stripped. A unit test that triggers this issue was added as well.

Note, I did not update all uses of cloneNode() because I was not sure if it was appropriate or necessary in all cases.