firebug lite

Firebug is an extension for Firefox, but what happens when you need to test your pages in Internet Explorer, Opera, and Safari?

The solution is Firebug Lite, a JavaScript file you can insert into your pages to simulate some Firebug features in browsers that are not named "Firefox".

Firebug Lite creates the variable "firebug" and doesn't affect or interfere with HTML elements that aren't created by itself.

Screenshots:

Latest Version: 1.2.1 (2008-09 CHANGELOG)

Installing Firebug Lite 1.2

Insert this line of code into any page that you want to contain Firebug lite:

    <script type='text/javascript' 
        src='http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'></script>

Firebug Lite as bookmarklet

Drag the following link to your bookmark toolbar and use Firebug Lite on any page:

Firebug Lite

Configuring Firebug Lite

Height of the firebug lite form is resizeable in latest version;

  <script type="text/javascript">
  firebug.env.height = 500;
  </script>
            

Also, developers can use their own css file;

  <script type="text/javascript">
  firebug.env.css = "/myown/firebug.css"
  </script>
            

Using Firebug Lite Offline

Download the source

Import firebug-lite-compressed.js or firebug-lite.js into your site's directory. Find "firebug-lite.css" URL on the javascript file which you imported and replace this with offline address of firebug-lite.css file.

    <script language="javascript" type="text/javascript" 
        src="/path/to/firebug/firebug-lite.js"></script>

Commands

Now FBLite supports all basic commands of Firebug.

firebug.watchXHR: Use this function to watch the status of XmlHttpRequest objects.

    var req = new XmlHttpRequest;
    firebug.watchXHR(req);

firebug.inspect: Now elements can be inspected in javascript code:

 firebug.inspect(document.body.firstChild);
            

On some browsers, the console object is already declared. If you observe errors in Safari, for instance, use the console commands in this fashion:

    firebug.d.console.cmd.log("test");
    firebug.d.console.cmd.dir([ "test" ]);

Notes

On some browsers, the console object is already declared. If you observe errors in Safari, for instance, use the console commands in this fashion:

    firebug.d.console.cmd.log("test");
    firebug.d.console.cmd.dir([ "test" ]);

Firebug Lite creates the variables "firebug" and doesn't affect or interfere HTML elements that aren't create by itself.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值