rotundasoftware/backbone.subviews — pull request #15 by markskipper (2014-03-31 06:37:06+00:00)
Title: Allow data-subview on non-div elements 

(replaces original pull request: white-space fixed)

I had a need to create a view responsible for a table row; its `el` is `'tr'`.
I put my `

` inside a `
` element in my template; when the subview gets rendered it replaces the `div` with a `tr`. But when the browsers run this, the `tr` ends after the empty `thead` in the page. This is because the initial `div` isn't allowed there, so the browser bumps it down the DOM.

By dropping the `div` from the selector pattern for `data-subview` attributes I can specify a `tr` as my subview element in the template so the browser leaves it in the right place and my subview gets rendered inside the `thead` too.