typo in "dom.js" in __toDomNode__ L: 3112
-
nickg
hi, I hope in short order to be porting or generalizing envjs to work with other engines so I appreciate the ticket.
this appears to be a odd spidermonkey/rhino extension, although it's claimed to be part of the js1.6 spec, which means it should be part of v8.
https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Stat...
i've never used e4x, but it seems that:
for each(xnode in e4){ kind = xnode.nodeKind();could be converted to
for (xnode_name in e4) { kind = xnode[xnode_name];??? thoughts welcome here.
-
nickg
sorry that should have been:
for (xnode_name in e4) { kind = xnode[xnode_name].nodeKind();or something damn similar.
-
nickg
Does this look right to you?
@@ -33,8 +33,9 @@ var __toDomNode__ = function(e4, parent, doc){ element, kind; //console.log('converting e4x node list \n %s', e4) - for each(xnode in e4){ - kind = xnode.nodeKind(); + for (item in e4) { + xnode = e4[item]; + kind = xnode.nodeKind(); //console.log('treating node kind %s', kind); switch(kind){ case 'element': -
nickg
take 2
var __toDomNode__ = function(e4, parent, doc){ - var xnode, + var xnode, domnode, children, target, value, length, element, - kind; + kind, + item; //console.log('converting e4x node list \n %s', e4) - for each(xnode in e4){ - kind = xnode.nodeKind(); + for (item in e4) { + xnode = e4[item]; + kind = xnode.nodeKind(); //console.log('treating node kind %s', kind); -
nickg
- State changed from new to resolved
- Assigned user changed from Thatcher to nickg
-
Thatcher
wow just catching up on this thread. I wasnt sure e4x was supported in V8
but I'm thrilled to hear it is now! Nice work guys!
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.