4 ms·
How easy is it to call native javascript libraries with opal? Having to write wrapping code stinks.
by jgrowl 11y ago
How easy is it to call native javascript libraries with opal? Having to write wrapping code stinks.
- icebraining 11y agoSeems 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 http://dev.mikamai.com/post/65322179075/opal-give-it-a-try