[Ur] ANNOUNCE: uru - the jQuery widget wrappers with a demo

Sergey Mironov grrwlf at gmail.com
Fri Dec 6 06:22:53 EST 2013


2013/11/22 Adam Chlipala <adamc at csail.mit.edu>:
>>
>> Sure, please grant 'grwlf' user with write permissions.
>>
>
> OK, done.  (Sorry for the delay!)
>
>

Thanks. I'll find some time to add an article.

>
> It's possible that the <active> pseudotag already does what you need here.
> E.g., you can write:
> <active code={alert "MUAHAHA!"; return <xml>hi!</xml>}/>
> which will pop up the alert and then fill in "hi!" (or something like that;
> it's been a while since I thought about this guy).
>
> Does this cover the use cases that matter to you?

It is close. There is a problem, however. <active> is designed to
execute arbitrary code (of type [transaction xbody]) and add the
resulting xml inplace. For my task It is not necessary to alter the
page, but the call should live in head, not in body. I've tried to
hack UrWeb and add support for [activeHead] pseudo-tag. I was able to
compile UrWeb and the demo, but, unfortunately, my code is not
executed. Quick xml source review as well as JS console show no
errors, so I suggest the problem is somewhere in evalD or underlying
eval calls. Do you have any ideas of what is wrong?

The patches is in attach. I've put the test into urscript library sources
https://github.com/grwlf/urscript/blob/master/Test2.ur

Regards,
Sergey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1_of_2_Add_activeHead_tag_.patch
Type: application/octet-stream
Size: 2240 bytes
Desc: not available
URL: <http://www.impredicative.com/pipermail/ur/attachments/20131206/6ca5a45e/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2_of_2_activeHead__don_t_modify_the_head__just_execute_the_code_provided.patch
Type: application/octet-stream
Size: 1551 bytes
Desc: not available
URL: <http://www.impredicative.com/pipermail/ur/attachments/20131206/6ca5a45e/attachment-0001.obj>


More information about the Ur mailing list