Search code examples
javascripthtmlimportinclude

Is it possible to reference a JavaScript link in a local JavaScript file


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.


Solution

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

    How to include js file in another js file?