<p>I 'm exploring for a browser solution / API that has the following features:</p>

<ul>
<li>Must support the nowadays default web technologies</li>
<li>Must support client side XSLT</li>
<li>Must support executing arbitrary Javascript on the pages it loads</li>
<li>Must be able to catch events from the web page targeted to the browser or OS (I am specifically interested in window.print())</li>
</ul>

<p>QtWebkit seemed like the way to go but it still doesn't support XSLT so I had to look for alternatives. SWT Browser is a wrapper around the native browser component of the underlying system and in linux that I 'm interested this would mean the firefox engine that supports the attributes I 'm interested in except that I haven't still found out how to catch window.print() and provide my own implementation instead of the default one that is opening up a print dialog.</p>

<p>Any suggestions?</p>

If you know a way how to catch the event in javascript an prevent the native dialog from showing, you can use the method shown in this
snippet
to catch the event in your SWT code.
The other option might be better though: Use mozilla's classes to register your own print handler. Something similar is shown in this
snippet
for the download handler, but I haven't tested if it is possible for the print handler as well.
The catch for this second option is stated in the snippet's javadoc:
IMPORTANT: For this snippet to work properly all of the requirements for using JavaXPCOM in a stand-alone application must be satisfied (see
http://www.eclipse.org/swt/faq.php#howusejavaxpcom
).