What error is thrown? Are you sure you want to use 
Firebug.Debugger.evaluate? It should only work when stopped in the 
debugger, I believe. As a proof-of-concept with CommandLine.evaluate, you 
can evaluate the following in a chrome-scope scratchpad, with Firebug open:

        Firebug.CommandLine.evaluate("1+1", Firebug.currentContext, null, 
null, function(res) { alert("result: " + res); }, function failure() { /* 
won't happen */ });

(obviously, in real code, "1+1" and Firebug.currentContext would be more 
generic, the second null parameter might be a specific window).

With eval I mean the window.eval function built into the JavaScript 
language - try e.g. content.eval("1+1") in a scratchpad.

Den lördagen den 13:e juli 2013 kl. 18:41:54 UTC+2 skrev Ebrahim:
>
> It would be nice if I can use these functions. I tried this function:
>
> Firebug.Debugger.evaluate(expr, context, scope); //  thisValue : null
>
> but does not work for me. I also could not find the eval function. 
>
> Ebrahim
>
>
>
> On Friday, July 12, 2013 9:16:19 PM UTC+2, Simon Lindholm wrote:
>>
>> Rather than emulate UI actions, you might also be able to use eval or 
>> CommandLine.evaluate (the latter if you need support for command line API, 
>> evaluating code in debugger frames, etc., but it's a more complex API).
>>
>> Den fredagen den 12:e juli 2013 kl. 13:46:48 UTC+2 skrev Ebrahim:
>>>
>>> Hi everybody,
>>>
>>> Could you please help me how can I access to the command line in the 
>>> console panel from my extension? 
>>>
>>> I want to programmatically copy a script within my extension in the 
>>> command line, run it, when is done, clear the editor. 
>>>
>>> Thanks for any help,
>>>
>>> Ebrahim
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/firebug.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/firebug/33c3d738-85d1-4e54-81fd-ad88bd2f5c3f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to