1.1 --- a/vm/src/main/java/org/apidesign/vm4brwsr/GenJS.java Thu Nov 29 10:47:49 2012 +0100
1.2 +++ b/vm/src/main/java/org/apidesign/vm4brwsr/GenJS.java Tue Dec 04 12:06:27 2012 +0100
1.3 @@ -91,19 +91,20 @@
1.4 );
1.5 }
1.6 }
1.7 - for (String resource : js.scripts.toArray()) {
1.8 - while (resource.startsWith("/")) {
1.9 - resource = resource.substring(1);
1.10 - }
1.11 - InputStream emul = l.getResourceAsStream(resource);
1.12 - if (emul == null) {
1.13 - throw new IOException("Can't find " + resource);
1.14 - }
1.15 - readResource(emul, out);
1.16 - }
1.17 - js.scripts = new StringArray();
1.18 }
1.19
1.20 + for (String resource : js.scripts.toArray()) {
1.21 + while (resource.startsWith("/")) {
1.22 + resource = resource.substring(1);
1.23 + }
1.24 + InputStream emul = l.getResourceAsStream(resource);
1.25 + if (emul == null) {
1.26 + throw new IOException("Can't find " + resource);
1.27 + }
1.28 + readResource(emul, out);
1.29 + }
1.30 + js.scripts = new StringArray();
1.31 +
1.32 StringArray toInit = StringArray.asList(js.references.toArray());
1.33 toInit.reverse();
1.34