2013/11/22 Adam Chlipala <[email protected]>: >> >> 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
1_of_2_Add_activeHead_tag_.patch
Description: Binary data
2_of_2_activeHead__don_t_modify_the_head__just_execute_the_code_provided.patch
Description: Binary data
_______________________________________________ Ur mailing list [email protected] http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
