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

Unsafe Global Name topojson #319

Open
ZheyangSong opened this issue Apr 21, 2018 · 0 comments
Open

Unsafe Global Name topojson #319

ZheyangSong opened this issue Apr 21, 2018 · 0 comments

Comments

@ZheyangSong
Copy link

ZheyangSong commented Apr 21, 2018

Because of HTML5's standards, every DOM element with unique id will be stored on window object with the id as the key and DOM element as the value. Thus, when there is an element with id="topojson", the window.topojson is contaminated before registering methods from topojson.js. The transform method has a name conflict with the SVG read-only attribute transform, eg. when <svg id='topojson'></svg> presents, the library's initialization will fail. You'd probably want to find another name for the method to avoid the collision... :)

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

1 participant