Hi Chris,

Searching in royale-compiler, that line seems to be generated in
MXMLRoyalePublisher.java
line 917 on getTemplateBody method

maybe the actual way compiler deal with this is a bit restricted, and we
can update that part including the <script> tags in the html template and
making ${body} only outputs "new App.start();", so people could switch to
its own "htmlTemplate" changing that to something like this:

<script type="text/javascript">
   royaleCompatibility = new RoyaleCompatibility();
   if (royaleCompatibility.isCompatible) {
       ${body}
   } else {
       royaleCompatibility.displayIncompatibilityText();
   }
</script>

Thoughts?

Carlos



El mar., 27 ago. 2019 a las 10:10, Chris Velevitch (<
[email protected]>) escribió:

> Where is the value of "${body}" defined? When I build a javascript app, the
> following code is inserted there:-
>
>    <script>
>           new MyApp().start();
>    </script>
>
> I want to be able to insert additional code there like:-
>
> <script type="text/javascript">
>    royaleCompatibility = new RoyaleCompatibility();
>    if (royaleCompatibility.isCompatible) {
>        new MyApp().start();
>    } else {
>        royaleCompatibility.displayIncompatibilityText();
>    }
> </script>
>
>
> How do I do that?
>


-- 
Carlos Rovira
http://about.me/carlosrovira

Reply via email to