Editing the HTML canvas element created by an App

I am using an app that will add html canvas element, my question is:

1- how to locate where in the theme files I can locate the canvas element?

2- I created a JS file and saved it in assets to modify the text in the canvas, I called the file in theme.liquid, but I don’t think it is working

this is the JS file, not sure if the syntax is correct:

var canvas = document.getElementByClassName('lower-canvas');
var ctx = canvas.getContext('2d');

ctx.font = '20px Arial';
ctx.letterSpacing = 0;
ctx.fillText('Hello, world!', 10, 50);

Here is how I call it in theme.liquid

<script src="{{ 'CANVAS_FIX.js' | asset_url }}" defer="defer"></script>

Nothing happen when I add this, so what should I do?