no message
This commit is contained in:
@@ -35,8 +35,18 @@
|
||||
document.getElementById('barPV').style.width = data.consPV + '%';
|
||||
document.getElementById('barGrid').style.width = data.consGrid + '%';
|
||||
}
|
||||
function handleMessage(msg) { Apply(msg); }
|
||||
// Kein requestAction-Aufruf hier nötig
|
||||
function handleMessage(msg) {
|
||||
try {
|
||||
var data = (typeof msg === 'string') ? JSON.parse(msg) : msg;
|
||||
Apply(data);
|
||||
} catch(e) {
|
||||
console.error('PV_Visu handleMessage error:', e, msg);
|
||||
}
|
||||
}
|
||||
// Bind to HTML-SDK
|
||||
if (typeof registerMessageHandler === 'function') {
|
||||
registerMessageHandler(handleMessage);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user