jdd icon indicating copy to clipboard operation
jdd copied to clipboard

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

Open nitinsurana opened this issue 5 years ago • 3 comments

nitinsurana avatar May 04 '19 00:05 nitinsurana

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.

zgrossbart avatar May 04 '19 00:05 zgrossbart

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 avatar May 04 '19 01:05 nitinsurana

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

nitinsurana avatar May 04 '19 01:05 nitinsurana