如何使用Clojure/ClojureScript创建html可嵌入小部件?

如何使用Clojure/ClojureScript创建html可嵌入小部件?,clojure,clojurescript,Clojure,Clojurescript,我想创建一个Web小部件。它必须访问远程clojure数据结构,并显示小部件参数请求的数据结构元素。视觉风格也可以远程控制 编辑: Youtube有以下内容: <iframe width="560" height="315" src="//www.youtube.com/embed/Z6bFyVGvg28" frameborder="0" allowfullscreen></iframe> <iframe width="425" height="350" fram

我想创建一个Web小部件。它必须访问远程clojure数据结构,并显示小部件参数请求的数据结构元素。视觉风格也可以远程控制

编辑:

Youtube有以下内容:

<iframe width="560" height="315" src="//www.youtube.com/embed/Z6bFyVGvg28" frameborder="0" allowfullscreen></iframe>
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.ca/maps?q=yahoo+corp&amp;ie=UTF8&amp;hq=&amp;hnear=&amp;ll=37.417223,-122.025112&amp;spn=0.006295,0.006295&amp;t=h&amp;iwloc=A&amp;output=embed"></iframe><br /><small><a href="https://maps.google.ca/maps?q=yahoo+corp&amp;ie=UTF8&amp;hq=&amp;hnear=&amp;ll=37.417223,-122.025112&amp;spn=0.006295,0.006295&amp;t=h&amp;iwloc=A&amp;source=embed" style="color:#0000FF;text-align:left">Agrandir le plan</a></small>

谷歌地图有以下特点:

<iframe width="560" height="315" src="//www.youtube.com/embed/Z6bFyVGvg28" frameborder="0" allowfullscreen></iframe>
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.ca/maps?q=yahoo+corp&amp;ie=UTF8&amp;hq=&amp;hnear=&amp;ll=37.417223,-122.025112&amp;spn=0.006295,0.006295&amp;t=h&amp;iwloc=A&amp;output=embed"></iframe><br /><small><a href="https://maps.google.ca/maps?q=yahoo+corp&amp;ie=UTF8&amp;hq=&amp;hnear=&amp;ll=37.417223,-122.025112&amp;spn=0.006295,0.006295&amp;t=h&amp;iwloc=A&amp;source=embed" style="color:#0000FF;text-align:left">Agrandir le plan</a></small>

因此,我怀疑远程服务器以特定URL句柄为目标的iframe可以完成这项工作

在iframe中编写小部件或只是内联页面并使其成为托管页面dom的一部分之间确实存在权衡。

这是一个非常类似的要求,在David Nolen演示项目中实现:

根据他的clojurescript react.js薄层“om”:


这太宽泛和抽象了…@user1184248,你能更具体一点吗?也许可以举一个实际的例子吗?可以详细说明一下吗(我是初学者)。谢谢大家!@user1184248我认为您需要遵循react教程(重点是创建一个可嵌入的小部件)和om教程:)@user1184248不要忘记Timothy Baldridge-Core.Async视频!