// Helper function for generating pseudo callbacks and sending data to the QML part of the application function postData(data, cb) { data._seed = Math.floor(Math.random() * 1000000) if(cb) { Muted._callbacks[data._seed] = cb; } if(data.args === undefined) { data.args = []; } navigator.qt.postMessage(JSON.stringify(data)); } window.Muted = { prototype: Object(), } window.Muted._callbacks = {} window.Muted._onCallbacks = {} function debug(/**/) { console.log("hello world") var args = arguments; var msg = "" for(var i = 0; i < args.length; i++){ if(typeof args[i] == "object") { msg += " " + JSON.stringify(args[i]) } else { msg += args[i] } } document.querySelector("#debugger").innerHTML += "