From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 5FF5D7F058 for ; Sat, 2 Jan 2016 22:19:14 +0100 (CET) IronPort-PHdr: 9a23:AlzQBBZW3N3reNr1in+jEhb/LSx+4OfEezUN459isYplN5qZpcW4bnLW6fgltlLVR4KTs6sC0LqI9fi4EUU7or+/81k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i760zceF13FOBZvIaytQ8iJ35rxj7j60qaQSjsLrQL1Wal1IhSyoFeZnegtqqwmFJwMzADUqGBDYeVcyDAgD1uSmxHh+pX4p8Y7oGx48sgs/M9YUKj8Y79wDfkBVGxnYCgJ45jxtAnOQSOP72MEQ2EbigZJCE7C9h6+Fq/xsy/7rvJwkBeXN8DsBeQsWTWm7r9zRVn2hS0KLRY29WjWjop7i6cN8zy7oBkq75TJeMnBOOBjZrLacpARTG9FdtRWVysHCYS5OdhcR9EdNPpV+tGu72AFqgGzUEz1XLvi Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=drupyog+caml@zoho.com; spf=Pass smtp.mailfrom=drupyog+caml@zoho.com; spf=None smtp.helo=postmaster@sender153-mail.zoho.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of drupyog+caml@zoho.com) identity=pra; client-ip=74.201.84.153; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="drupyog+caml@zoho.com"; x-sender="drupyog+caml@zoho.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of drupyog+caml@zoho.com designates 74.201.84.153 as permitted sender) identity=mailfrom; client-ip=74.201.84.153; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="drupyog+caml@zoho.com"; x-sender="drupyog+caml@zoho.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@sender153-mail.zoho.com) identity=helo; client-ip=74.201.84.153; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="drupyog+caml@zoho.com"; x-sender="postmaster@sender153-mail.zoho.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DjAABhPohWm5lUyUpehAxtiFm1YiKFbQKBETwQAQEBAQEBAQEQAQEBAQEICQsJIS6CLYIIAQEEMgEFCwE0AQIOCyEWDwkDAgECAUUGAQwGAgEBiBUBAwEEDQQKrg2FWgKICiIoJYMGAQEBAQEBBAEBAQEBAQEBFAeLVYk8lwuBcINQiBGBXEp4gwSDBYVURIUUiGI5glGBZXGFEAEBAQ X-IPAS-Result: A0DjAABhPohWm5lUyUpehAxtiFm1YiKFbQKBETwQAQEBAQEBAQEQAQEBAQEICQsJIS6CLYIIAQEEMgEFCwE0AQIOCyEWDwkDAgECAUUGAQwGAgEBiBUBAwEEDQQKrg2FWgKICiIoJYMGAQEBAQEBBAEBAQEBAQEBFAeLVYk8lwuBcINQiBGBXEp4gwSDBYVURIUUiGI5glGBZXGFEAEBAQ X-IronPort-AV: E=Sophos;i="5.20,513,1444687200"; d="scan'208";a="159236958" Received: from sender153-mail.zoho.com ([74.201.84.153]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-SHA; 02 Jan 2016 22:18:22 +0100 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=subject:to:references:cc:from:message-id:date:user-agent:mime-version:in-reply-to:content-type; b=ZZqclkK7QIP5yaPRCz1LnprM6QybLfyw8zdx1EGPU1Hozc8Rr1GLyo69p1DdCYukEAbUIjFBJ2fG jwLSXYLiLFDo3Pyn7KvYzGmgE4khbEBJlWV7TeRq6mCVejOLUb6D Received: from [192.168.1.8] (did75-8-82-228-42-129.fbx.proxad.net [82.228.42.129]) by mx.zohomail.com with SMTPS id 1451769493740553.5034028962051; Sat, 2 Jan 2016 13:18:13 -0800 (PST) To: rixed@happyleptic.org, Philippe Veber References: <20160102174325.GA22783@pim.happyleptic.org> <20160102204246.GA23759@pim.happyleptic.org> Cc: caml users From: Drup Message-ID: <56883E91.1030704@zoho.com> Date: Sat, 2 Jan 2016 22:18:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20160102204246.GA23759@pim.happyleptic.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Zoho-Virus-Status: 1 Subject: Re: [Caml-list] js_of_ocaml and Indeed, It seems we are missing a Dom_svg.document function. Could you please open a bug report ? However, in this case, you should use Tyxml_js. The code is going to be exactly the same as the one with normal tyxml, except the module is Tyxml_js.Html5. You can see a complete example here: https://github.com/talex5/js-skeleton/blob/master/main.ml Le 02/01/2016 21:42, rixed@happyleptic.org a écrit : > Indeed TyXML can generate XHTML trees with svg elements. > But how to use that to update the DOM from JS generated by js_of_ocaml? > > # echo > toto.ml < let svg = Dom_svg.createSvg Dom_html.window##document > EOF > # ocamlfind ocamlc -syntax camlp4o -package "js_of_ocaml js_of_ocaml.syntax" -c toto.ml > Error: This expression has type Dom_html.document Js.t > but an expression was expected of type Dom_svg.document Js.t > Type > Dom_html.document = (... yanked for sanity ...) > is not compatible with type > Dom_svg.document = (... yum yum ...) > The second object type has no method anchors > > Apparently that's a known issue of js_of_ocaml: > https://github.com/ocsigen/js_of_ocaml/issues/276 > > that I don't know how to work around nicely, may be because I have no idea how > js_of_ocaml interacts with tyxml. I guess you are the pveber of that discussion > so probably you can shed some light on this? >