[Twisted-web] liveevil problem: nested functions get lost
Federico Di Gregorio
fog at initd.org
Tue Mar 1 01:47:31 MST 2005
Il giorno lun, 28-02-2005 alle 17:54 -0800, Donovan Preston ha scritto:
> On Feb 28, 2005, at 3:09 PM, Federico Di Gregorio wrote:
> > substituting "this" to "node"? It is fine for me and even the "js" name
> > is not too bad (i.e., I can't think of anything better right now.)
>
> That is correct, and I hope it is ok. The way "literal" (to be renamed
> "js") is written is very convenient, too:
>
> handler(mycallable, liveevil.js.this.value)
>
> Would work just as well (__getattr__ constructs new literal instances).
> There is already a module-global "document" literal, so you can do
> livepage.document.getElementById. literal (js) provides __getitem__ as
> well as __call__ implementations.
Usefull. Can we also have a module-global "this"? And maybe "window"?
document, window and this are almost the only JS globals I can think of
that are used in a normal page.
> I hope it all makes sense, it is somewhat experimental at this point.
> One good thing about this new implementation is that there are
> extensive javascript quoting unittests, where there were none before,
> so hopefully it is less buggy, more flexible, and less likely to change
> in the future.
Great. :)
federico
--
Federico Di Gregorio http://people.initd.org/fog
Debian GNU/Linux Developer fog at debian.org
INIT.D Developer fog at initd.org
Sei una bergogna. Vergonga. Vergogna. -- Valentina
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Questa parte del messaggio =?ISO-8859-1?Q?=E8?= firmata
Url : http://twistedmatrix.com/pipermail/twisted-web/attachments/20050301/8a5337a5/attachment.bin
More information about the Twisted-web
mailing list