Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Can I use this to access the DOM #5

Closed
adelevie opened this Issue · 2 comments

2 participants

@adelevie

I'm using the sandbox you hosted here: http://qiezi.me/projects/mruby-web-irb/mruby.html#

Calling Document does not work. Is something like this even possible?

@xxuejie
Owner

Okay, I made a few changes, now the demo above should be able to access DOM(you may need to refresh the browser cache). For example, you can use following line to print the page title:

puts MrubyJs::get_root_object.document.title

Here MrubyJs::get_root_object is actual window, and you can access any DOM object starting from this. For a more detailed explanation please refer to here.

@xxuejie xxuejie closed this
@adelevie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.