This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit b4e3ff671c7b48662f5f8a17548a0ea1d7043d66
Author: Josh Tynjala <[email protected]>
AuthorDate: Tue Mar 31 11:17:40 2026 -0700

    JSCPublisher: don't call start() for MXML classes either
    
    At the time, I wasn't sure if MXML needed a start() method. It does not.
---
 RELEASE_NOTES.md                                           |  1 +
 .../compiler/internal/codegen/js/jsc/JSCPublisher.java     | 14 ++------------
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index cdd1a9a2f..c1b0d5a48 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -70,6 +70,7 @@ Apache Royale Compiler 1.0.0
 - compiler: Fixed `<fx:DesignLayer>` allowing children without 
`[DefaultProperty]` metadata.
 - compiler: Added `${mainClass}` token to HTML template replacement.
 - compiler: Fixed resolution of `[InstanceType]` classes when they are in a 
package.
+- compiler: JS target doesn't call `start()` for MXML classes, similar to AS3 
classes.
 - debugger: Added missing isolate ID to SWF load and unload events.
 - debugger: Fixed debugger targeting the current JDK version instead of the 
intended minimum JDK version.
 - debugger: Fixed localized messages appearing as unprocessed tokens.
diff --git 
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jsc/JSCPublisher.java
 
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jsc/JSCPublisher.java
index 741ad4a7e..793c39073 100644
--- 
a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jsc/JSCPublisher.java
+++ 
b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jsc/JSCPublisher.java
@@ -39,18 +39,8 @@ public class JSCPublisher extends MXMLRoyalePublisher
     @Override
     protected String getTemplateBody(String mainClassQName)
     {
-        IDefinition def = project.resolveQNameToDefinition(mainClassQName);
-        if (def != null)
-        {
-            IDefinitionNode node = def.getNode();
-            if (node instanceof IMXMLDocumentNode)
-            {
-                //we should probably customize MXML too, but for now, pass it 
to the
-                //default implementation -JT
-                return super.getTemplateBody(mainClassQName);
-            }
-        }
-        //for ActionScript classes, simply call the constructor by default
+        // simply call the constructor by default
+        // there is no start() method to call
         StringBuilder bodyHTML = new StringBuilder();
         bodyHTML.append("\t<script type=\"text/javascript\">\n");
         bodyHTML.append("\t\tnew ");

Reply via email to