Frage

I want to create a Web Widget. It must access remote clojure data structure and display elements of it requested by a widget parameter. The visual style would also be dictated remotely.

EDIT:

Youtube has this:

<iframe width="560" height="315" src="//www.youtube.com/embed/Z6bFyVGvg28" frameborder="0" allowfullscreen></iframe>

Google Maps has this:

<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>

So I suspect an iframe that targets a specific URL handle by the remote server could do the job.

There are indeed tradeoffs between writing your widget inside an iframe or simply inline the page and make it part of the dom of the hosting page. http://prettyprint.me/prettyprint.me/2009/05/30/widgets-iframe-vs-inline/

War es hilfreich?

Lösung

This is a very similar request which it's achieved in this David Nolen demostration project:

https://github.com/swannodette/om-sync

based on his clojurescript react.js thin layer called"om":

https://github.com/swannodette/om

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top