I wrote something similar (simpler) a few months ago. It used Qt but it was supposed to be client agnostic by providing native wrappers. Anyway, it was a fun project but I decided to not publish it because it was a simple prototyping exercise.
I believe something like this will kill the browser.
I believe something like this will kill the browser.