1 | The javascript: protocol allows the script to be placed inline as follows: |
2 | Script { url "javascript: function foo( ) { ... }" } |
3 | The url field may contain multiple URL's and thus reference a remote file or in-line code: |
4 | Script { |
5 | url [ "http://foo.com/myScript.js", |
6 | "javascript: function foo( ) { ... }" ] } |
7 | The file extension and MIME type for JavaScript source code is .js and application/x-javascript. |