Currently it is only possible to load JS scripts from the root node of GUI XML page files.
This is a big disadvantage, because it means that unrelated scripts are coupled together which should otherwise be perfectly split.
That again means that a mod inserting one script file or folder will have to overwrite the GUI page in order to have that or these scripts loaded.
That again means that two mods both inserting one script cant be launched together, because they both would overwrite the page file, thus removing the change of the other mod (conflict).
This patch solves that by simply allowing to specify <script> attributes in any <object> node, not only the root <objects> node.
Notice that there is the <action> field with which one can include scripts, also script files, but that is only done on a JS event, whereas the <script> includes are done at file loading time.