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

svg use produces "multiple root elements must be wrapped in an enclosing tag" error #514

Closed
mfolkeseth opened this issue Jun 20, 2017 · 5 comments

Comments

@mfolkeseth
Copy link

mfolkeseth commented Jun 20, 2017

It seems strange to me that the following markup produces the multiple root elements must be wrapped in an enclosing tagerror message:

return html`
      <div>
        <svg>
          <use xmlns:xlink="http://www.w3.org/1999/xlink" href="#reply"></use>
        </svg>
      </div>
    `;
@YerkoPalma
Copy link
Member

I'm not clear if you say that this code should get the error message or if it is getting the error message and it shouln't.

@mfolkeseth
Copy link
Author

Sorry, a bit unclear there. This code is getting this error. I don't see why it does.

@yoshuawuyts
Copy link
Member

yoshuawuyts commented Jun 20, 2017 via email

@YerkoPalma
Copy link
Member

This is a bel issue not choo specific. and is not actually an issue, it happens to me when I had <path></path> in my svg, it fixed changing it to <path />. So, in your case it should fix with

return html`
      <div>
        <svg>
          <use xmlns:xlink="http://www.w3.org/1999/xlink" href="#reply" />
        </svg>
      </div>
    `;

@mfolkeseth
Copy link
Author

Thanks, that fixes my problem. I'll close this.

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

3 participants