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

Namespaced attributes don't work #264

Closed
Rich-Harris opened this issue Jan 24, 2017 · 1 comment
Closed

Namespaced attributes don't work #264

Rich-Harris opened this issue Jan 24, 2017 · 1 comment
Labels

Comments

@Rich-Harris
Copy link
Member

This is broken:

<svg>
  <defs>
    <circle id='stamp' r='10' fill='blue'/>
  </defs>

  <!-- this should render a red circle in the top left -->
  <use xlink:href='#stamp' x='20' y='20' fill='red' stroke='blue'/>
</svg>

The <use> element doesn't recognise the xlink:href attribute. This line in the generated code...

setAttribute( use, 'xlink:href', "#stamp" );

...should be something like this instead:

setAttributeNS( use, xlink, 'href', '#stamp' );

(where xlink is "http://www.w3.org/1999/xlink")

Rich-Harris added a commit that referenced this issue Jan 24, 2017
@Rich-Harris
Copy link
Member Author

this was fixed already in 1.6.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant