Comment 8 for bug 1323735

Revision history for this message
Olivier Tilloy (osomon) wrote :

I found the culprit: UnityWebAppsUtils.js (from the unity-webapps-qml package) does this:

        var script = 'import com.canonical.Oxide 1.0 as Oxide; ' +
                ' Oxide.ScriptMessageHandler { msgId: "UnityWebappApi-Message"; contexts: ["' +
                this._WEBAPPS_USER_SCRIPT_CONTEXT +
                '"]; ' +
                '}';
        var messageHandler = Qt.createQmlObject(script, this.webview);
        messageHandler.callback = handler;
        this.webview.messageHandlers = [ messageHandler ];

So it effectively overrides the webview’s existing message handlers.