ThinkDigit Home
Subscribe to the Newsletter
Search
 
SKOAR!       / SHOPPING
 
 
News / Features / Downloads / Channel 5
 
 
A Look at the Upcoming Firefox Developer Features
 
Posted by
Kshitij Sobti
1
50
Posted on: Jan 25, 2012 23:04:14 IST

 
 
 

The Scratchpad

The console is not enough to test large amounts of code. To get rid of edit, save reload cycles, Firefox added a new Scratchpad feature which works as a prototyping tool for JavaScript.

It offers a simple text editing interface where one can enter JavaScript and execute it on the currently active page. One can then save these files to disc. One can load previously saves JavaScript files into Scratchpad as well. So it serves not only as a tool for running small scripts on existing pages, for proper hacking and developing web applications.

With a small preference change, Scratchpad can run code in the context of Firefox chrome. This gives the coder nearly unlimited control over Firefox itself, since nearly all its core functionalities are accessible and controllable via JavaScript. This can be particularly useful for Firefox Add-on creators.

To make testing code easier, the Scratchpad lets you select what part of the code to run. You can enter large amounts of code in Scratchpad, and test it in small batches by simply selecting the part of the code you wish to run, right-clicking and selecting Run (or pressing Ctrl+R). This way you can enter different versions of the code in the same Scratchpad, and run them one by one to see which works best. You can also quickly run the same code against different web pages, just change the active browser tab, and run the code!

Additionally, you can chose to inspect the result of your code, which will open up the object inspector on the result object; or you can choose the "Display" command to display the result of the evaluation. Just enter "43.11 + (11 -3)*8" and run the display command and it will append the result of that equation to the Scratchpad as a comment.

Scratchpad will soon add a syntax highlighter to make it even simpler to code with; and it will even append any errors messages as comments in the code.

What's coming next

Some of the best developer features lie ahead. Some such as the Page Inspector and Style Inspector, and syntax highlighting for the Scratchpad are coming soon, while others, such as the Style Editor and Tilt, are still a little way off. With Firefox's rapid release cycle though, they can all be in your hands right now, in the Beta, Aurora or Nightly channels.

Turn to the next page to learn more about what's coming next to Firefox.

< Previous
  |  
Next >






 
 
 
Latest Features
 
 
 
 
Comments 1comments
 
Posted by Zlrilfze on Feb 01,2012
 
I'm self-employed Clonazepam Online gii
 
 



 
 

 
 
 
 
Newsletter Subscription
 
 
 
 
 
 
 
 
 
 
 
 
 
 
http://devworks.thinkdigit.com