Quintin Par
Quintin Par

Reputation: 16252

Check firebug from page to get results of net panel

How can I access the Firebug API from my webpage to get output of the net panel?

My intention is to embed a small script in my webpage to show the time taken for DomContentLoaded

Upvotes: 1

Views: 146

Answers (1)

Jan Odvarko
Jan Odvarko

Reputation: 421

The only Firebug API you can access from a web page is the console object. http://getfirebug.com/wiki/index.php/Console_API

This object is explicitly injected into every web page for logging into the Console panel.

If you want to access information in the Net panel you need to create a Firefox/Firebug extension or use an existing extension such as NetExport that allows to export all data collected by the Net panel: http://www.softwareishard.com/blog/netexport/

There are other options:

1) You can register a listener for "DOMContentLoad" event and measure the time yourself

2) You can use web timing specification http://dev.w3.org/2006/webapi/WebTiming/ This already works in Chrome and implementation for Firefox is in progress, see: https://bugzilla.mozilla.org/show_bug.cgi?id=570341

Honza

Upvotes: 2

Related Questions