Not the same thing but related: I was logged with Wiki browser + extension, the app got the same webview + extension and I'm logged on it too.
About you request: I suppose you can simply create the callbacks methods on window and feed them from the app.