[parenscript-devel] How to generate element[i].childNodes[0].nodeValue
Red Daly
reddaly at gmail.com
Wed Nov 25 08:10:26 UTC 2009
On Tue, Nov 24, 2009 at 12:43 PM, Wout Perquin <wout.perquin at skynet.be> wrote:
> On Tue, 2009-11-24 at 19:42 +0000, Wout Perquin wrote:
>> Hi,
>> I would like to generate :
>> "var value = element[i].childNode[0].nodeValue"
>> in one sentence.
On my local version, slot-value accepts multiple slots:
(slot-value element i 'child-node 0 'node-value)
=>"element[i].childNode[0].nodeValue;"
Nested @s and the like tend to become confusing, so I prefer this
solution. I don't know if it is part of the current Parenscript or
not.
Best regards,
Red Daly
>>
>> Currently I have a workaround :
>> (ps:ps
>> (let ((foo (aref element i))
>> (value (slot-value (aref foo.child-nodes 0)'node-value)))))
>> which renders :
>> "var foo = element[i];
>> var value = foo.childNodes[0].nodeValue;"
>>
>> Is there another more direct way ?
>> Thanks in advance.
>> Wout Perquin
>
>
> _______________________________________________
> parenscript-devel mailing list
> parenscript-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
>
More information about the parenscript-devel
mailing list