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

-- 
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