Firefox 6 - developer goodies
Written by Lucy Black   
Thursday, 18 August 2011

If you use Firefox as your browser you have probably updated to Version 6 which was released yesterday. What you might not have noticed is that it has some new features for developers, in particular Scratchpad.

Scratchpad has been provided as a new way in which developers can enter, execute, test, and tweak JavaScript code.

One key difference with the Firefox Web Console or the Firebug command line is that it moves away from the single-line interface and lets you enter a portion of code and then run, inspect or display it. It also also has a way to save its contents or load a JavaScript file. Using this feature, you could save Scratchpads with collections of commonly used functions.

When you run code in Scratchpad, it runs in a sandbox that has access to everything on your page, but keeps you from accidentally leaking variables onto your page and if you’re doing development work on Firefox itself or on Firefox add-ons, you can set Scratchpad up so that it has access to all of the browser’s internals.

 

firefox6

 

Introducing the new text editor on the Mozilla blog, Kevin Dangoor explains:

The idea behind Scratchpad is simple: the browser is a fantastic place to experiment with JavaScript.

He adds "an interesting historical aside"

Scratchpad was heavily inspired by the Workspaces feature of Smalltalk environments. Thirty years in, we're still reinventing Smalltalk :-)

 

  

Click above  for a video demo, produced by Rob Campbell, which explores using  Scratchpad. (Only works with WebM compatible browsers).

 

For developers who prefer the Web Console, Mozilla has also updated it, improving the auto-complete tool and letting you change its location - the options are now top or bottom of the browser window or in a separate window.

A Window.matchMedia API has been added to help developers optimize their site or web app across disparate platforms. Two other new APIs, WebSockets and server-sent event facilitate communication between Firefox and back-end web servers.

At the same time as Firefox 6, Mozilla also released a new version of Firefox for Android, which is available from the Google Andriod Market. For users, it features a new welcome page, its interface is streamlined to be consistent with the Android look and feel while fonts and buttons have been optimized for tablets and enhanced image rendering give faster zooming, crisp text and reduced pixelation.

For developers it adds single touch events API, for  detecting touch events and gesture and an IndexedDB API which provides local database storage for increasing performance, reducing data usage and offline browsing.  

 

firefox6

 

More information:

Download Firefox 6

Mozilla devtools

Release notes for Firefox for Android

 

If you would like to be informed about new articles on I Programmer you can either follow us on Twitter or Facebook or you can subscribe to our weekly newsletter.

 

Banner


Android Comes To Wearables And Watches
19/03/2014

Android seems to be the key mobile operating system and now it aims for the same status on smaller wearable devices. It sounds innocent enough, but this could be the change that the market needs to ma [ ... ]



HTML Templates For dtSearch
31/03/2014

The newly released dtSearch 7.5 adds HTML5 templates for publishing data on the Web in a searchable format.


More News

Last Updated ( Thursday, 18 August 2011 )
 
 

   
RSS feed of news items only
I Programmer News
Copyright © 2014 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.