I am developing a web component using Polymer 2, and would like to make use of a third-party JavaScript library, which was not specifically designed for use with web components.
If you have an external library that does things like document.querySelector
then you have two choices.
document
.Beyond those two options you will probably not be able to use a third party library that assumes document
will work for everything.
I guess the other option is to re-evaluate the third party library and see if it is REALLY worth using.
On my team we don't use third party libraries that are not just solid logic. Things like moment.js are just logic and we can use them without problems.
But something like jQuery? Yuck! I can't see needing something like that for a component.
Good luck!