Closed cloakedninjas closed 6 years ago
This issue was recent raised with Marionette as well as currently what happens is nothing. The view appears to work and if you adhere to jQuery for rendering and appending, there may not be any error given, you'll just end up with a blank view where you were expecting it to be prefilled with DOM. I don't really think that creating an element is the ideal solution as it doesn't really follow what I imagine the intention is of setting the el as a selector. Honestly I'd prefer that el
didn't take a selector at all.. it's easy enough to give the view an el... but since it does take a selector, I think it'd be better to error if it doesn't find it.
That's working as intended. If you pass a selector to view.el
, it needs to exist. Otherwise, why pass it at all?
This is more of a question really...
Given this fiddle: https://jsfiddle.net/oowrs2gh/ (copied below also)
The
el
is undefined. And I wonder if perhaps_ensureElement
should fallback to creating an element if the selector fails?