--
Martin Honnen
http://JavaScript.FAQTs.com/
E4X has what I call a bug where method names are hidden from the normal
property lookup mechanism, even though the spec says they're
function-valued properties of XML.prototype and XMLList.prototype. We
are talking about fixing this with a function namespace.
I've prototyped this in SpiderMonkey such that (with a fix just checked
in today) the following works:
$ cat fn.js
xmlObject = <a><b>hi</b><b>there</b></a>
l = xmlObject..*.(function::nodeKind() == 'text' &&
print(function::toXMLString()))
$ Linux_All_DBG.OBJ/js -x fn.js
hi
there
The function reserved identifier, when used as a namespace prefix,
identifies an internal namespace whose URI is guaranteed not to collide
with any valid URI. This namespace allows qualified access to function
valued properties of XML.prototype (i.e., methods).
/be