I know it is possible to put JavaScript is a specific .js file and then include this in any page by just doing...
<script src="MyJavaScript.js"></script>
I note that with respect to these .js files that are included:
- They do not actually have to end with .js
- Their content should not be enclosed with tags
However, I need to import some JavaScript that is in a file ending with extension .page (I am using force.com platform) where th JavaScript is enclosed with the tags. The reason I need to do this is so I can write som unit tests using quint. Now, my hands are tied here. The cleanest way is to obviously refactor out the JavaScript from .page file into a .js file but I can't do this. I want to know is there any way I can just import the script snippets enclosed with tags.
Many thanks