While working on a firefox extension for a feature on paahijen, I had a loong date with XUL. XUL (pronounced as zool, is an XML based User Interface Language). More stuff about xul can be found at XUL - MDC or XUL planet
One option is to do all the UI in XUL and use XHR for talking HTTP. So I started with XUL UI. If you thought CSS is a bitch, try XUL and you'd almost fall in love with CSS. In short, for someone short on patience, looking for a quick solution, laying out a XUL UI is not an option. Looking for alternatives, I found an interesting alternative in the tutorial on xulplanet, which uses iframes instead. In my opinion, this is a better approach, unless there is a specific need for Client only UI. First, it is simple, and second you don't need to learn a lot of XULgiri.
So the final solution was a XUL window having a XUL button (on which oncommand was implemented to do clipboard copy) and the HTML document rendered in iframe.
One last issue is - to get contents inside an iframe. The solution is mentioned here.
Guess, thats it, rest of the stuff is quie straight forward.