我该如何使用Clojure / ClojureScript创建一个可嵌入HTML的小部件?

3
我希望创建一个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>

我怀疑一个定位到远程服务器特定URL的iframe可以达到目的。

在将小部件嵌入iframe中或仅内联网页并使其成为托管页面DOM的一部分之间确实存在折衷方案。 http://prettyprint.me/prettyprint.me/2009/05/30/widgets-iframe-vs-inline/


1
这太宽泛和抽象了... - Joaquin
@user1184248,你能具体一点吗?或者给一个实际的例子? - Petrus Theron
1个回答

2

能否详细解释一下(我是初学者)。谢谢! - leontalbot
1
@user1184248 我认为你需要跟随 React 教程(专注于创建可嵌入的小部件)http://facebook.github.io/react/docs/tutorial.html,然后是 Om 教程 https://github.com/swannodette/om/wiki/Basic-Tutorial :) - tangrammer
1
@user1184248 别忘了 Timothy Baldridge - Core.Async 视频!https://www.youtube.com/watch?v=enwIIGzhahw - tangrammer

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接