no message

This commit is contained in:
2025-06-24 14:21:07 +02:00
parent b4a9bd12db
commit 8c4430f444
2 changed files with 8 additions and 7 deletions
+7 -6
View File
@@ -14,6 +14,7 @@
</style>
</head>
<body>
<div id="pv_visu">
<div class="label" id="prodLabel"></div>
<div class="bar-container">
@@ -37,14 +38,14 @@
}
function handleMessage(msg) {
try {
var d = (typeof msg === 'string') ? JSON.parse(msg) : msg;
Apply(d);
} catch (e) {
console.error('PV_Visu handleMessage error', e, msg);
var data = (typeof msg === 'string') ? JSON.parse(msg) : msg;
Apply(data);
} catch(e) {
console.error('PV_Visu handleMessage error:', e, msg);
}
}
// Register HTML-SDK handler
// Bind to HTML-SDK
if (typeof registerMessageHandler === 'function') {
registerMessageHandler(handleMessage);
}
</script>
</script>