How can you inspect the history object?

5 views
Skip to first unread message

rednoise

unread,
Jul 16, 2009, 5:03:43 PM7/16/09
to MozLab
Hi all,

I am trying to inspect the history object but it seems to be
protected? When I do:

repl.inspect(history)

I get errors. But not so if I check the location (repl.inspect
(location)). I think the history object is protected by default, so
hackers can't see where you have been.

I am trying to get the URLs visited.

I wouldn't be trying to do this if I could pass a URL string to the
history.go() method, but that is not available on Moz (other browsers
do allow it however).

At this point, I am thinking of inspecting the history menu for the
URLs. However, I wish I could just get them from history.

Thanks for any help.

Massimiliano Mirra

unread,
Jul 24, 2009, 4:23:31 PM7/24/09
to moz...@googlegroups.com
Try this:

repl> repl.enter(content)
[object Window] — {getInterface: function() {…}, repl: {…}, i: "2",
eApTitle: {…}, isElement: false, s: "margin-top", p: "align", ...}
repl> repl.inspect(history)
<object>.0=https://console.aws.amazon.com/ec2/home#c=EC2&s=Volumes
[...]

You're probably trying to inspect the history object of the main
browser window, but I don't think that's what you want.

m.
Reply all
Reply to author
Forward
0 new messages