You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Harbs <ha...@gmail.com> on 2016/01/01 11:18:17 UTC
Re: [FALCONJX][FLEXJS] XML handling (was Re: [FlexJS] Back port)
Looking at the code, it looks to me like ((JSFlexJSEmitter)getEmitter()).isXMLList() returns true if it’s either XML OR XMLList. Is that right?
On Dec 31, 2015, at 6:45 PM, Harbs <ha...@gmail.com> wrote:
> OK. Sounds like a fun challenge. I guess it’s not a bad idea to get my feet wet… ;-)
>
> On Dec 31, 2015, at 5:21 PM, Alex Harui <ah...@adobe.com> wrote:
>
>> Sounds reasonable. Do you want to try to make the changes to the compiler
>> yourself?
>>
>> I think you can just copy the pattern in this commit:
>> 22fa6defa3ed2896de4eba1a5a1b316e1e3c2b0f
>> In these files: BinaryOperatorEmitter.java and TestFlexJSGlobalClasses.java
>>
>> -Alex
>>
>> On 12/31/15, 1:02 AM, "Harbs" <ha...@gmail.com> wrote:
>>
>>> Another question:
>>>
>>> How should we handle equality? According to the E4X spec, if regular
>>> equality is used, it returns true if the structure of the XML matches
>>> even if the objects are different objects. So:
>>>
>>> var xml1 = <foo><baz /></foo>;
>>> var xml2 = <foo><baz/></foo>;
>>> xml1 == xml2 // true
>>> xml1 === xml2 // false
>>> xml1 === xml1 // true
>>> var xml1 = <foo><baz /></foo>;
>>> var xml2 = <foo><baz name="baz"/></foo>;
>>> xml1 == xml2 // false
>>> xml1 === xml2 // false
>>> xml1 === xml1 // true
>>>
>>> I’m thinking I should add an equals(xml) method which you’d map to the
>>> “==" operator.
>>
>
Re: [FALCONJX][FLEXJS] XML handling (was Re: [FlexJS] Back port)
Posted by Alex Harui <ah...@adobe.com>.
On 1/1/16, 2:18 AM, "Harbs" <ha...@gmail.com> wrote:
>Looking at the code, it looks to me like
>((JSFlexJSEmitter)getEmitter()).isXMLList() returns true if it’s either
>XML OR XMLList. Is that right?
Yes. I think that method probably should be renamed.
-Alex