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

Allow any attributes on <template> #566

Open
zcorpan opened this issue Jan 27, 2016 · 0 comments
Open

Allow any attributes on <template> #566

zcorpan opened this issue Jan 27, 2016 · 0 comments
Labels
addition/proposal New features or enhancements document conformance

Comments

@zcorpan
Copy link
Member

zcorpan commented Jan 27, 2016

From #541

<template class="js_globalmessage"> <div class="globalmessage {{type}}"> <div class="messagecontainer"> {{message}} {{#if closable}} <button type="button" class="close js_close">&#x2a09;</button> {{/if}} </div> </div> </template>    

Hmm... Having {{#if foo}} etc as text makes it hard to check content models, e.g. in an ul... And this won't work inside e.g. tables. Maybe it would be better to use nested template elements?:

<template class="js_globalmessage">
 <div class="globalmessage {{type}}">
  <div class="messagecontainer">
   {{message}} 
   <template data-if="closable">
    <button type="button" class="close js_close">&#x2a09;</button>
   </template>
  </div>
 </div>
</template>

(Maybe the template element should allow any attribute, like embed, so you can do if="..." etc?)

@zcorpan zcorpan added the addition/proposal New features or enhancements label Jan 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements document conformance
Development

No branches or pull requests

1 participant