Hacker News new | ask | show | jobs
by jgrowl 3880 days ago
How easy is it to call native javascript libraries with opal? Having to write wrapping code stinks.
1 comments

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