Hi all.
Here’s my challenge to anybody out there:
Make a way so that, using jruby, you can edit the DOM of a page.
Here’s an excellent start:
http://almaer.com/blog/running-ruby-in-the-browser-via-script-typetextruby/comment-page-1#comment-47381
Any takers?
-r
In SWT it would be totally possible.
Browser widget <-> JavaScript <-> Java <-> JRuby
We actually have this implemented in redcar so you can call jruby to
execute js in the browser. So if nothing else you can do:
browser.execute “$(’#posts’).append(‘
hi
’)”
But if you cared, you could wrap up the jQuery API in a JRuby API.
Done!
On 7 Oct 2010, at 23:08, Roger P. wrote:
–
Posted via http://www.ruby-forum.com/.
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
Of course the ideal would be to be able to
communicate from the browser straight into the applet…
Appears that it is possible to access the DOM from an applet:
http://download.oracle.com/javase/tutorial/deployment/applet/manipulatingDOMFromApplet.html
as well as run javascript generated from within an applet, within that
page:
http://www.rgagnon.com/javadetails/java-0172.html
So appears the building blocks are there…
Created a bounty for it:
http://github.com/rdp/ruby_bounties/wiki/ruby-bounties (at the bottom)
-r
Daniel L. wrote:
In SWT it would be totally possible.
Browser widget <-> JavaScript <-> Java <-> JRuby
True. Interesting. Ideally I’d want to be able to do it in the browser
itself…I suppose one option would be to actually use jruby (in an
applet) to run a local web server that you can send and receive AJAX
calls from. That would be intense, but maybe work (and probably be
cross browser compatible). Of course the ideal would be to be able to
communicate from the browser straight into the applet…
-r