zgrossbart / jdd

A semantic JSON compare tool
http://www.jsondiff.com
Apache License 2.0
1.03k stars 180 forks source link

Corrupts the global namespace, hard to inject multiple instances in page #30

Open nitinsurana opened 5 years ago

zgrossbart commented 5 years ago

Thank you for the bug, but I'm not sure I understand. JSONDiff is an application and not a library. It's not meant be injected multiple times in a page. Can you please tell me more about what you're trying to do.

nitinsurana commented 5 years ago

Sure, I'm trying to use this application in a custom UI as a sub-component, but since it corrupts the global namespace; it's hard to start new instance of it with different dataset. I've forked it and hopefully, will turn it into a library and if you're open to it, possibly send a PR back.

nitinsurana commented 5 years ago

Maybe just adding a parent capability, to not look for elements all across the page should work out fine.