Cannot read property 'noConflict' of undefined (Chrome Extension)
google-chrome-extension, javascript, jquery
Solution
Yes, there is. The way to fix it is to understand the isolated context content scripts run in.
A content script has no access to any JS loaded by the page itself; if you need jQuery, you need to package it with your extension and inject it yourself first. On the bright side, there can be no conflict with the page, and you can simply use `$`.
Problem
I have a chrome extension which is using jQuery as content script with noconflict like; ``` var myDomainJquery = $.noConflict(true); ``` on the other hand some websites are also using jQuery noconflict on their way like; for example new york times ``` <script>var jQ = jQuery.noConflict(true);</script> ``` Then I am getting Cannot read property 'noConflict' of undefined error on the host website. Is there any way to fix this problem?