Contents

Intro

These are some Questions and Answers about Fresno.

FAQ

How can I move to a new page?

Lots of ways, it depends.

The simple way is to set the content's location content.location.href = 'http://simile.mit.edu/'.

You may actually want to invoke the click() or select() method on some portion of the DOM; not all elements in the DOM have these methods.

You may want to invoke a javascript routine the page's author has rigged up to orchestrate his page transitions; this is often the easiest way to navigate "menus."

What's up with "Host context unloading! Going back to creation context."

This messages is generated by Mozrepl when the object your currently inside of is unloaded. For example if you have done repl.enter(content) (for example using the -c switch to Fresno) and you then change to a new page (e.g. you do location.href = "http://www.google.com/".

With Fresno this message can appear to be intermittent. For example if you do:

./fresno -c content 'location.href="http://google.com/"'

you may or may not get the error. This is because you have a race condition; Fresno may break the connection to mosrepl before the old page is unloaded; in which case you won't get the message. At least I think that's what's going on with the intermittent appearance of this message.

How to I trigger further Javascript after a page transition?

I wish I knew! Here are assorted pages that talk about that question from various points of view: [1], [2], [3], and [4]

In the face of my inability to puzzle this out I tend to do one functino per page and then invoke them from an external shell script with bogus pauses between the steps.

Add more here