Assume, that I use WebKit inside my Qt application. Can I get access to the JS context? For example, it can be used to provide some specific APIs for user JS or to provide custom constraints over JS code.
If I'm understanding the question correctly yes, with the addToJavaScriptWindowObject() method. Read the documentation about the QtWebKit Bridge for a more complete explanation.