Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

E4X with NodeJS

Is there any way to get E4X(ECMAScript) to work with NodeJS?

It would really help to output slick html/xml without hassle/noise.

It works fine using SpiderMonkey since it is natively implemented, but it doesn't seem to work with NodeJS.

using node

$node
> var name = "World";
> var p = <p>Hello {name}</p>;
...

using spidermonkey

$js
js> var name = "World";
js> var p = <p>Hello {name}</p>;
Hello World
js>

thanks in advance

like image 420
zanona Avatar asked Feb 20 '11 12:02

zanona


1 Answers

Node uses V8, which does not implement E4X as of now.

There's a 2 year old issue, but still active issue on the topic. But it has no real "status" nor was it assigned to anyone.

So in short: The answer is no.

like image 190
Ivo Wetzel Avatar answered Nov 17 '22 00:11

Ivo Wetzel