Is it smart to use jQuery as a JavaScript library in Chrome Extensions? jQuery and other DOM libraries are intended to hide the differences between browsers, and since I’m targeting Chrome only, should I use it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are no reasons to not use jQuery on one of your extension pages (background, popup, options etc). You should always use a local jQuery copy though, not load a remotely hosted one through http.
I would advise against injecting jQuery as a content script though, if possible. If all you need is some simple selector or event listener, injecting around 100kb of js code on each page visit is a bit of an overkill.