mirror of
https://github.com/thegecko/web-bluetooth-dfu.git
synced 2025-12-15 21:48:12 +08:00
Bounded results output in web example
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
input { font-size: 20px; }
|
input { font-size: 20px; }
|
||||||
button { font-size: 20px; padding: 0 20px; display: block; margin: 20px auto; }
|
button { font-size: 20px; padding: 0 20px; display: block; margin: 20px auto; }
|
||||||
.device-type { width: 160px; margin: 20px auto; white-space: nowrap; }
|
.device-type { width: 160px; margin: 20px auto; white-space: nowrap; }
|
||||||
|
#results { height: 300px; overflow: auto; border: 1px solid lightgray; margin: 5px; }
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@@ -36,6 +37,7 @@
|
|||||||
function log(message) {
|
function log(message) {
|
||||||
console.log(message);
|
console.log(message);
|
||||||
resultsEl.innerText += message + "\n";
|
resultsEl.innerText += message + "\n";
|
||||||
|
resultsEl.scrollTop = resultsEl.scrollHeight;
|
||||||
}
|
}
|
||||||
dfu.addLogger(log);
|
dfu.addLogger(log);
|
||||||
hex2bin.addLogger(log);
|
hex2bin.addLogger(log);
|
||||||
|
|||||||
Reference in New Issue
Block a user