Proposal: native XML object support.

Jacob Bloom mr.jacob.bloom at gmail.com
Sun May 19 16:56:56 UTC 2019


> And things such as E4X already exist.

Building on that, JSX is just a code transformation that can be used
without React. You can swap React out for another compatible library
with a pragma: https://babeljs.io/docs/en/next/babel-plugin-transform-react-jsx#pragma
-- JSX + a React-like library that creates vanilla DOM elements could
be used to achieve a lot of the requested functionality


On Sat, May 18, 2019 at 4:01 AM ViliusCreator
<viliuskubilius416 at gmail.com> wrote:
>
> XML in JS without React could totally bring usage in Node js, not only JS. For example, you could pass XML object as parameter to website from server and server would change it to right way, so XML object would be turned to HTML element.
> However, in non web-development environment, it would have no usage. Since sometimes Node js is used for general-purpose and not web-development, XML would be practically useless and JSON would be used. And things such as E4X already exist.
> The benefit of XML is that you can do `<a b=”c”>d <e></e></a>`(which is equivalent to
>
> ```json
> {
>     ‘//name’: ‘a’,
>     ‘//inner’: [‘d ’, {...}],
>     b: ‘c’
> }
> ```) and it’s more readable than JSON version of it.`
>
>
> Virus-free. www.avast.com
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss


More information about the es-discuss mailing list