Why does this create an invisible canvas tag with nothing in it?
Author: kupietoolsCreated Feb 11, 2026Updated Feb 11, 2026
I'm getting this output:
<div id="qrcode" title="[qr code text here]"><canvas width="200" height="200" style="display: none;"></canvas><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAA ... p9uEbpKLj2vYENMj2V0AAFQENUtFxbXsCGmT7KyCAioAGqei4tj0BDbL9FRBAReBftX3Fo3ZmyC8AAAAASUVORK5CYII=" style="display: block;"></div>
Why is the canvas tag there? Deleting it doesn't change the display of the QR code.
Source: davidshimjs/qrcodejs