This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Global variable to store connected device | |
let connectedDevice = null; | |
async function printHelloWorld() { | |
try { | |
// Check if we have a previously connected device | |
if (!connectedDevice) { | |
// Get saved device ID from localStorage | |
const savedDeviceId = localStorage.getItem('printerDeviceId'); | |