Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any merit to allowing users to set flag indicating tagName/className for view is inside template? #2649

Closed
MeoMix opened this issue Jun 30, 2015 · 2 comments

Comments

@MeoMix
Copy link
Member

MeoMix commented Jun 30, 2015

I've see this question come up more than a few times. I have mixed feelings on it.

Users want to do something like:

var MyView = Marionette.ItemView.extend({
    templateOnly: true,
    template: _.template('<span class="myView"></span>')
});

which would be equiv. to:

var MyView = Marionette.ItemView.extend({
    tagName: 'span',
    className: 'myView'
});

I can't imagine this would be exceedingly difficult to do, but might be a slight perf. hit for the extra check when rendering, but it would allow all HTML to stay inside the template.

Thoughts?

@MeoMix MeoMix changed the title Is there any merit to allowing users to set flag indicating tag/className for view is inside template? Is there any merit to allowing users to set flag indicating tagName/className for view is inside template? Jun 30, 2015
@jridgewell
Copy link
Contributor

We're having this conversation over in #2357.

@MeoMix
Copy link
Member Author

MeoMix commented Jun 30, 2015

Gotcha, ty.

@MeoMix MeoMix closed this as completed Jun 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants