On Tue, Jan 6, 2015 at 9:18 AM,  <[email protected]> wrote:
> The only open question on feasibility would be on how to programmatically 
> trigger a message handler?

You can do that by doing

var syncHandlers = [];
var oldSetMessageHandler = window.setMessageHandler;
window.setMessageHandler = function(type, handler) {
  if (type == "request-sync") {
    syncHandlers.push(handler);
  }
  oldSetMessageHandler.call(window, type, handler);
}

/ Jonas
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to