How to access javascript variables?

34 views
Skip to first unread message

vlma...@gmail.com

unread,
May 17, 2013, 3:30:46 PM5/17/13
to penta...@googlegroups.com
Hi,

If I create simple html

<html>
<body>
   <script type='text/javascript'>
      var text=123;
   </script>
</body>
</html>

and open it in firefox, how can I get by pentadactyl to the variable 'text'?

If I open javascript :js window and type 'content.window.text' the autocompletion shows it has value 123. However if I type alert(content.window.text) it says 'undefined'. Is there some trick in obtaining the value of variable?

Thank you
--
  Vlad

vlma...@gmail.com

unread,
May 21, 2013, 8:38:08 PM5/21/13
to penta...@googlegroups.com
For the record, it's alert(content.wrappedJSObject.text);

__
  Vlad
Reply all
Reply to author
Forward
0 new messages