If you attempt to include your custom script directly via a tag then it will fail to parse, and you won't be able to get the 's innerHTML.
I would suggest using a JSONP-style approach. Start by defining a global handler function, e.g.
// myproglang.js
window.registerSource = function(source) {
myProgLang.eval(source);
}
And then in your source file, wrap your code in a call to that function:
// source.mypl
registerSource("\
Dim foo as Integer;\
")
It's a bit ugly as it requires the text file to escape newline characters in order to maintain the string literal, but other than using XHR, that's the only viable solution I can think of.
You could always write a compile step for this "language" that replaces "\n"
with "\\\n"
and wraps the source in a registerSource() call. As long as it's transparent it's a viable option.