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 tags not showing when using node! macro in the client #34

Closed
ivanceras opened this issue Aug 2, 2021 · 2 comments
Closed

svg tags not showing when using node! macro in the client #34

ivanceras opened this issue Aug 2, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@ivanceras
Copy link
Owner

Svg elements is not showing when used in browser. This would be rendered correctly when used server-side.

  <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg">
    <defs>
      <pattern id="Pattern" x="0" y="0" width=".25" height=".25">
        <rect x="0" y="0" width="50" height="50" fill="skyblue"/>
      </pattern>
    </defs>

    <rect fill="url(#Pattern)" stroke="black" width="200" height="200"/>
  </svg>
@ivanceras ivanceras added the bug Something isn't working label Aug 2, 2021
@ivanceras ivanceras self-assigned this Aug 2, 2021
@ivanceras
Copy link
Owner Author

This is because svg elements need to be created using document.create_element_ns. This is mitigated by exposing the sauron-parse feature which allows us to determine the namespace of a tag via lookup.

@ivanceras
Copy link
Owner Author

Fixed in commit 9411a82

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant