in reply to Re^3: MozRepl/Client.pm does not support firefox 7.0
in thread MozRepl/Client.pm does not support firefox 7.0

Ouch! I'm sorry - I encountered the same issue and locally already fixed it without bumping the MozRepl::RemoteObject version and without releasing it to CPAN.

If you're in a bind, the current version from Github should make "everything just work again", even with Firefox 7.

The (ugly) change is that

eval "function() {}";

does not return an anonymous function in Javascript (on Firefox 7) anymore. The change is to use:

eval "expr_=function() {}; expr";

Update: Now released as v0.28 on CPAN.

Replies are listed 'Best First'.
Re^5: MozRepl/Client.pm does not support firefox 7.0
by Anonymous Monk on Sep 23, 2011 at 14:16 UTC

    The (ugly) change is that eval "function() {}"; does not return an anonymous function in Javascript (on Firefox 7) anymore

    How odd. I remember that being a bug once in firefox2/3

    What if you use return function(){};?

      I don't know how (in Javascript) eval and return interact. It might be worth investigating if the problem comes up again in a different place.

      So far, there is only one piece in MozRepl::RemoteObject needing functions, the implementation of ->declare(), and that one was easily patched to support the temporary assignment to a variable. Changing the Javascript code to become eval "return $expr" does not work in the general case because $expr is allowed to contain multiple statements. I don't want to implement a JS parser just to find the last statement in some block and put the return before it, so I just change the call sites of that code instead.