Skip to content

Instantly share code, notes, and snippets.

@jwoertink
Created April 28, 2010 19:57
Show Gist options
  • Select an option

  • Save jwoertink/382622 to your computer and use it in GitHub Desktop.

Select an option

Save jwoertink/382622 to your computer and use it in GitHub Desktop.
rb> envjs = Johnson::Runtime.new
=> #<Johnson::TraceMonkey::Runtime:0x1f2442c>
rb> envjs.extend Envjs::Runtime
=> #<Johnson::TraceMonkey::Runtime:0x1f2442c>
rb> window = envjs.evaluate("window")
=> [object Window 0]
rb> puts window.location.to_s
about:blank
=> nil
rb> puts window.document.innerHTML
<html><head><title></title></head><body></body></html>
=> nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment