Tuesday 12 February 2013

Firebug include() command


Firebug Command Line is probably one of the most important Firebug features and its value is yet extended by set of built-in commands.

One of the new commands, introduced in Firebug 1.11 is include() and this post is intended to explain how to use it .

Include Remote Script

The basic purpose of include() command is to include a remote script into the current page.
include("http://code.jquery.com/jquery-latest.min.js")



In this particular example we included jQuery script and effectively jQuerified the page.

Create Alias

It would be irritating to type long URLs (and remember them) every time you reload the page and so, it's possible to create an alias.
include("http://code.jquery.com/jquery-latest.min.js", "jquery")
Now, all you need to do to include jQuery on your page is type:
include("jquery")
Aliases are persistent across Firefox restarts and list of existing aliases can be displayed by typing:
include();



To remove an existing alias type:
include(null, "jquery");

~firebug team

No comments:

Post a Comment