Assume I have a Mac OS X application which links to WebKit and uses a WebView to display web content.
If the JavaScript in this webview calls the window.history.pushState()
method, how do I detect this in Objective-C?
Ideally, I'm looking for something like an ObjC delegate callback which informs my application: "pushState() was called with these parameters: XXX".
Note: I am really looking for a solution in ObjC. Assume it is not acceptable for me to muck around with the JS on the page and replace/swizzle the pushState()
method in JS.