0

YQL execute prototypes

I would like to add more functions to XMLNode.

I tried this way:
XMLList.prototype.function::someFunction= function someFunction() {
return this.toString() + "someFunction";
};


but yql parser returns error:
Error: missing name after . operator<javascript>:8:XMLList.prototype.function:^:someFunction= function someFunction() {
Error: syntax error<javascript>:10:}^;
Exception: Compilation produced 2 syntax errors. (<javascript>#1)

How can I implement XMLNode prototypes?

by
1 Reply
  • QUOTE (semenchenco @ Jun 19 2009, 01:22 AM) <{POST_SNAPBACK}>
    I would like to add more functions to XMLNode.

    I tried this way:
    XMLList.prototype.function::someFunction= function someFunction() {
    return this.toString() + "someFunction";
    };


    but yql parser returns error:
    Error: missing name after . operator<javascript>:8:XMLList.prototype.function:^:someFunction= function someFunction() {
    Error: syntax error<javascript>:10:}^;
    Exception: Compilation produced 2 syntax errors. (<javascript>#1)

    How can I implement XMLNode prototypes?


    Its not possible to extend the prototype of the E4X objects in YQL.

    Jonathan
    0

Recent Posts

in YQL