Re:Rails bindings for Opal
by jgrowl on Wednesday November 04, 2015 @11:42AM
(#10507744)
How easy is it to call native javascript libraries with opal? Having to write wrapping code stinks.
[ Parent
| on HN ]
Re:Rails bindings for Opal
by icebraining on Wednesday November 04, 2015 @12:43PM
(#10508209)
Seems pretty easy:
$window = Native(`window`)
puts $window[:location][:href] # => http://localhost/
puts $window.document.querySelector('title').innerText # => "Test page"
http://dev.mikamai.com/post/65322179075/opal-give-it-a-try