Let's say that we have a file with .js extension. We all know that it's a javascript file, but let us assume that the file type is not the usual text/javascript, instead it is text/anythingelse. Also, I have a interpreter installed that can interpret the data in the .js file with type text/anythingelse and give me pure javascript as output. But the question is how can I include the .js file with type text/anythingelse in the html markup ? As :
<script type="text/anythingelse" src="myfile.js"></script>
is not seeming to work ! The interpreter is designed something like this :
const Interpret = () => {
const el = document.querySelectorAll("script[type='text/anythingelse']")
for ( var i = 0; i < el.length; ++i ) {
// Interpretaion process start from here......observe the "el" constant
}
}
So how can I do that ?