0

for example if i wanted to reference this JS link:

import https://embed.twitch.tv/embed/v1.js;

I can reference it in an HTML file like this:

<script src="https://embed.twitch.tv/embed/v1.js"></script>

But is there a way to reference it in a JavaScript? I'm trying to use more of it's attributes within my code base, not just within the HTML.

2 Answers2

0

Fisrt download the js file you will use , then in your js source file you can use import ./example.js to use them, instead od, you use a package tool such as webpack or glup

2239559319
  • 114
  • 1
0

You can reference it in HTML, not within the javascript. Please refer the below link.

How to include js file in another js file?

krthi_66
  • 72
  • 6