Firebug.currentContext represents the data shared within Firebug. It is the
context Firebug is running in.
Sebastian
On Monday, July 29, 2013 10:19:40 AM UTC+2, liuping wrote:
>
> it's also useful for my question, thank you! but i'm not clear about the
> Firebug.currentContext, can you help me?
>
> 在 2013年7月14日星期日UTC+8上午4时08分34秒,Simon Lindholm写道:
>>
>> 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/f0703402-dcb3-4f80-9f6a-a44c9b18e8bb%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.