On Dec 22, 3:02 pm, Jan Honza Odvarko <[email protected]> wrote:
> alert(document.getElementsByClassName("level_green")[0].textContent);
>
> This code is using global |document| which is XUL document of the Firebug
> UI (not the page document)
>
> Since there is no element with class "level_green" in Firebug UI it throws
> an exception when trying to access the first returned element  [0]
>
> Try following:
>
> initialize: function(context)
> {
>   Firebug.Panel.initialize.apply(this, arguments);
>
> alert(context.window.document.getElementsByClassName("level_green")[0].textContent);
>
> }
>
> Honza




Thank you very much!
One more question:

I want to call this alert every 5 seconds.
You already told me to implement a "SHOW" and a "HIDE" methods and
call a setTimeout function.
Where in the "HelloWorld" example of you (written above) should I
write the code and how?

-- 
You received this message because you are subscribed to the Google
Groups "Firebug" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
https://groups.google.com/forum/#!forum/firebug

Reply via email to