Skip to content

Conversation

TheGr8Nik
Copy link

Hi,

I have made a version with the possibility to change dynamically the 'xlink:href' attribute

What do you think?

Regards,
Andrea

Changing of the 'xlink:href' attribute is watched trough the
MutationObserver if present or with the polling fallback.
Lowered polling time to 1s
@jonathantneal
Copy link
Owner

What you could do instead is hijack the setAttribute method, right?

@TheGr8Nik
Copy link
Author

Yes, it's a good idea! But is safe to change a methods?
On MDN I have read that you should not change a native method

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In IE8 you would need a Function.bind polyfill.

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

Successfully merging this pull request may close these issues.

3 participants