[Bese-devel] Parenscript patch / Allowing strings and numbers for slot names in CREATE construct

Marijn Haverbeke marijnh at gmail.com
Fri Jul 21 07:57:24 UTC 2006


I ran across a problem where a javascript library wanted me to pass an
object with the attributes for a DOM object (MochiKit's createDOM), in which
I wanted to include a 'class' attribute. But IE decides to choke on
javascript that uses the word class in an object literal, unless it is
escaped as a string. Since the javascript standard allows you to use strings
and numbers as slot names in object literals, but parenscript's (create
....) didn't, I made this patch which fixes that, and allows one to do
(create "class" "foobar").

Regards,
Marijn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/bese-devel/attachments/20060721/77aeaa2e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: strings-and-numbers-as-slot-names-patch
Type: application/octet-stream
Size: 10543 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/bese-devel/attachments/20060721/77aeaa2e/attachment.obj>


More information about the bese-devel mailing list