batmanjs/batman — pull request #919 by nsimmons (2013-11-28 23:33:12+00:00)
Title: Add destroyif binding

I added a new binding "destroyif". This binding is not a real binding, in the sense that it doesn't actually bind to the keypath. It's a one-off check that will remove the node and it's children from the DOM if the value is true. This is useful for properties that will be static throughout the life of the current page.

I am testing this in Shopify currently while looking through our htm templates and trying to optimize rendering. I wanted to get this PR up so people can provide their feedback and if it makes sense.

@pushrax @angelini @kristianpd @nickjs