This commit is contained in:
2025-06-24 14:16:28 +02:00
parent af7497466d
commit 56485a73eb
2 changed files with 53 additions and 56 deletions

View File

@@ -14,7 +14,6 @@
</style>
</head>
<body>
Hallo
<div id="pv_visu">
<div class="label" id="prodLabel"></div>
<div class="bar-container">
@@ -38,14 +37,14 @@
}
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);
var d = (typeof msg === 'string') ? JSON.parse(msg) : msg;
Apply(d);
} catch (e) {
console.error('PV_Visu handleMessage error', e, msg);
}
}
// Bind to HTML-SDK
// Register HTML-SDK handler
if (typeof registerMessageHandler === 'function') {
registerMessageHandler(handleMessage);
}
</script>
</script>