Yogort
Yogort

Reputation: 107

Trouble adding third party libraries to chrome extension

Problem

I am trying to add third party libraries to a chrome extension I am building. I am trying to dynamically add the script. I downloaded jquery and added it to the project. Then I tried to dynamically add p5.min.js and p5.dom.min.js using jquery.

Image of error message -- p5.dom.min.js is loaded, but p5.min.js is not?

Code

Notes

Upvotes: 1

Views: 802

Answers (1)

user4723924
user4723924

Reputation: 15

You don't need jquery for this. Where's your...

 script1.type='text/javascript';

You may also want to consider...

 script1.async=true;

For instant testing you can also include...

 script1.onload=function(){alert('Script loaded!');};

Upvotes: -2

Related Questions