[ 
https://issues.apache.org/jira/browse/FLEX-35203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15755847#comment-15755847
 ] 

Joel Anderson commented on FLEX-35203:
--------------------------------------

I was able to reproduce this.  
SDK:  FlexJS Nightly Build (2016/12/16)
OS:  MacOS 10.10.3
Browser:  Firefox 50.0.2

Here is my full class:
{code}
<?xml version="1.0" encoding="utf-8"?>
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009";
                                xmlns:js="library://ns.apache.org/flexjs/basic" 
                                xmlns:local="*"
                                pageTitle="HelloWorld" 
xmlns:ns="library://ns.apache.org/flexjs/html5">
                           
        <fx:Declarations>
        </fx:Declarations>
        
        <fx:Script>
                <![CDATA[
                
                // XML is in the default package, so no import is required
                public var foo : XML = new XML();
                        
                ]]>
        </fx:Script>
        
        <js:valuesImpl>
                <js:SimpleCSSValuesImpl />
        </js:valuesImpl>
        
        <js:initialView>
                <js:View>
                        <js:Container width="100%" height="100%" >
                                <js:Label id="lbl" text="Hello World" 
width="200" />
                        </js:Container> 
                </js:View>
        </js:initialView>
        
 </js:Application>
{code}

With a Javascript build, the resulting page is blank.  Here is the stack trace 
reported by Firefox:
{noformat}
ReferenceError: XML is not defined[Learn More]  TestFlex35203.js:38:3
        TestFlex35203 
file:///Users/joelanderson/Documents/Flex/temp_workspace/TestFlex35203/bin/js-debug/TestFlex35203.js:38:3
        <anonymous> 
file:///Users/joelanderson/Documents/Flex/temp_workspace/TestFlex35203/bin/js-debug/index.html:99:3
{noformat}


> XML() class is broken javascript mode in 0.8 dev
> ------------------------------------------------
>
>                 Key: FLEX-35203
>                 URL: https://issues.apache.org/jira/browse/FLEX-35203
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: FlexJS
>    Affects Versions: Apache FlexJS 0.7.0, Apache FlexJS 0.8.0
>            Reporter: Pan Li
>
> {code}
>       <fx:Script>
>               <![CDATA[
>               
>               var foo : XML = new XML();
>                       
>               ]]>
>       </fx:Script>
> {code}
> above code result in runtime javascript error
>  Uncaught ReferenceError: XML is not defined
> the same code works in swf mode



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to