There are functions, but I've seen significant use of XML as an "Object". IMO it is what makes e4x possible: the dot-path lookup as below:
Var foo:XML = <this><is><a name="test" /></is></this> Trace(foo.is); Trace(foo..a(@name=="test")); Trace(foo..test); But I could be wrong and there is some other way to handle this. -Alex On 7/3/14 12:51 PM, "Harbs" <harbs.li...@gmail.com> wrote: >Why does it need setter/getter? E4X is all functions isn't it? > >Yeah. JSON is generally a better way to go, but some APIs are still XML >and then there's manipulation of XML documents (which I tend to do a lot >of...) > >On Jul 3, 2014, at 7:53 PM, Alex Harui <aha...@adobe.com> wrote: > >> I took a quick look a while back. Required getter/setter support in the >> browser. And then the remaining question: will it perform? It is >>similar >> to the AMF question. Doable, but may not be faster than switching to >>JSON. >> >> -Alex >> >> On 7/3/14 9:48 AM, "Harbs" <harbs.li...@gmail.com> wrote: >> >>> Has anyone looked into writing a js library to copy the functionality >>>of >>> E4X? >>> >>> It seems to me that at least 90% of E4X could be pretty easily >>>replicated >>> in a js libraryĆ >>> >>> Besides namespaces, the only thing that seems hard to me is complex >>> selectors. >>> >>> On Jul 2, 2014, at 7:53 PM, Alex Harui <aha...@adobe.com> wrote: >>> >>>> FWIW, FlexJS is eventually going to need to find a way to warn folks >>>> about >>>> use of E4X >>> >> >