Much like the HTML script
element, this is used to declare a script to be used by the XUL window. You should usually put scripts in a separate file pointed to by the src
attribute, but you may also place the script inline inside the opening and closing script
tags.
More information is available in the XUL tutorial.
<script src="test.js"/> <script src="http://example.com/js/test.js"/> <script> function foo(){ // code } </script>
src
type
application/javascript
.application/javascript
will always use the latest available JavaScript version. If you omit this attribute, the default (and older) JavaScript version is used (like you get when including a JavaScript file from web content without specifying a version number).Inherited from XUL element |
Inherited Properties |