[Ur] [UrWeb] urscript library plus a couple of patches

Sergey Mironov grrwlf at gmail.com
Fri Dec 6 06:52:01 EST 2013


Hi. I wrote a small library which allows to insert <script> tags
referencing foreign scripts. I hope you find it doesn't violate
security too much since user should explicitly allow the script url in
the project file. Typical usage example is:

fun js {} : transaction xhead =
  return (Script.insert (blessMime "text/javascript") (bless
"http://code.jquery.com/ui/1.10.3/jquery-ui.js"))

fun main {} : transaction page =
  s <- js {};
  return
    <xml>
      <head>
        {s}
      </head>
      <body>
      </body>
    </xml>

The library requires a couple of small patches for the UrWeb. The
first one adds `typedef uw_Basis_string uw_Basis_xhead' declaration to
the C header (forgotten by mistake). The second one adds
`-print-cinlude' command line argument which should make writing
makefiles easier (the last command line patch from me, i promise:)

Regards,
Sergey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1_of_1_Add__print_cinlude_command_line_option.patch
Type: application/octet-stream
Size: 1074 bytes
Desc: not available
URL: <http://www.impredicative.com/pipermail/ur/attachments/20131206/6dbe22cb/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1_of_1_Add_C_declaration_for_the_xhead_type.patch
Type: application/octet-stream
Size: 658 bytes
Desc: not available
URL: <http://www.impredicative.com/pipermail/ur/attachments/20131206/6dbe22cb/attachment-0001.obj>


More information about the Ur mailing list