You need to tell Ur/Web about the SVG and other tags through Ur/Web's FFI
and a .urs file. (See Section 11.3 of the Ur/Web manual.) I did this once
for simple SVG shapes in the past and am attaching the files. It's not
complete, but you'll hopefully find it helpful as a baseline.

I eventually abandoned the SVG approach for what I was doing because it
didn't play nicely with Ur/Web's <dyn/> tags, but I didn't properly
investigate the issue.



On Sat, Dec 24, 2016 at 1:46 PM, Yves Cloutier <[email protected]>
wrote:

> Hello,
>
> What would be the syntax for rendering SVG in urweb? I did a test using:
>
> fun main () = return <xml>
>   <head>
>     <title>Pattern Maker</title>
>   </head>
>
>   <body>
>       <svg height="210" width="500">
>         <line x1="0" y1="0" x2="200" y2="200" 
> style="stroke:rgb(255,0,0);stroke-width:2"
> />
>       </svg>
>   </body>
>
>
> but this doesn't seem to work.
>
>
>
> _______________________________________________
> Ur mailing list
> [email protected]
> http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
>
>

Attachment: svg.urp
Description: Binary data

Attachment: svg.urs
Description: Binary data

_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

Reply via email to