How to add EXTRENAL <script>method</script> inside vue

I am trying to implement something like this: <script type=“text/javascript” id=’ ’ src=“https://xxxxxx/xx.js”>/script>
<script>function(’’,{},’’); /script>

Is there a way to invoke method present in external js script from inside vuejs??

If its your own custom script you can import it into your component
example:

	//your vue component
	import { someFunction } from "pathtoscript";

	//call function where you like someFunction();

	//pathtoscript file
	export function someFunction() {
		console.log("does my function work")
	}

If it a third party you could mount it in your component

	//example using third party twitch
	<template>
		<div ref="twitchExample"></div>
	</template>


	mounted() {
	  const twitchRef = this.$refs.twitchExample;
	  let script = document.createElement('script');
	  script.setAttribute('src','https://embed.twitch.tv/embed/v1.js');
	  script.addEventListener('load', () => {
	    const options = {
	      width: "100%",
	      height: "100%",
	      channel: "someCHannel",
	      layout: "video"
	    };
	    new window.Twitch.Embed(twitchRef, options);
	  }, {once: true});
	  document.body.appendChild(script);
	}

Or you can try call the window object
window.whateverYourObjectIs

@otemu Thanks for your help.
I did something like mentioned below using jquery. May not be as efficient but it works.
<template>
<div id=“append_here”>
</template>

<script>
import $ from “jquery”;

mounted(){
$("<script src=“externalfile”></script>").appendTo("#append_here");
$("<script>method()</script>").appendTo("#append_here");
}

</script>