Ashus.ashus.net
Opera 12 extension compatibility fix - Printable Version

+- Ashus.ashus.net (https://ashus.ashus.net)
+-- Forum: My creations (https://ashus.ashus.net/forum-3.html)
+--- Forum: Guides / Návody (https://ashus.ashus.net/forum-8.html)
+--- Thread: Opera 12 extension compatibility fix (/thread-126.html)



Opera 12 extension compatibility fix - Ashus - 29.3.2012

The console shows Unhandled DOMException: INVALID_STATE_ERR on running:
Code:
opera.extension.onconnect = function(event){
 event.source.postMessage(...);
}; 
I tried a little debug with my own extensions using similar postMessage, the trick is to use opera.extension.broadcastMessage instead of event.source.postMessage . Replace it in the extension's background.js and it should work again.