I am not even sure if this is the correct way to do it or not so I will give some background information.
I want to create an application that works in a similar way to the firefox view selection source “thing”. Ideally I would like to be able to highlight some code on a webpage and then save it to a database.
If you are talking about pulling code from a website I would probably build a browser extension rather than a full blown app -- let those guys deal with the hard parts and then you can just access the sources much like the view source selection.
I agree. If you are using it with web pages no need for an app.
The Mozilla addon SDK will do the trick.
I am also using the same feature of Firefox for creating web application but these are not useful that is why I am using firebug software for creating desktop applications. <snip>