[Project_owners] get variable from current page

Neil neil at parkwaycc.co.uk
Wed Apr 16 07:47:34 PDT 2008


joe ertaba wrote:

> is there any way to get used variable in current document from extension
>
> e.g
> html code of current document
> .....
> <script type="text/javascript">
> var bb="bbb";
> </script>
> ......
>
>
>
>
> I want to use bb variable in my Firefox extension

This is only safely possible in Firefox 3:

http://developer.mozilla.org/en/docs/XPConnect_wrappers#Chrome_Code_.28extensions.2C_etc.29

content.wrappedJSObject.bb does the trick.


More information about the Project_owners mailing list