Write a canvas class with ES6. No canvas image is generated on the page.

    let canvasNode = document.getElementById("canvas"),
        ctxs = canvasNode.getContext("2d");

    console.log(canvasNode)


    class CircleProgress {
        constructor(ctxs, width, height, arc) {
            this.ctx = ctxs
            this.ctx.canvas.width = width
            this.ctx.canvas.height = width
            this.arc = arc
        }

        clearFill() {
            this.ctx.clearRect(0, 0, this.width, this.width);
        }

        fillBg() {
            this.ctx.beginPath();
            this.ctx.lineWidth = this.arc;
            this.ctx.strokeStyle = "-sharpccc";
            this.ctx.arc(this.width / 2, this.width / 2, 45, 0, 2 * Math.PI);
            this.ctx.stroke();
        }

        fillArc(x) {
            this.ctx.beginPath();
            this.ctx.lineWidth = this.arc;
            this.ctx.strokeStyle = "-sharpccc";
            this.ctx.arc(this.width / 2, this.width / 2, 45, -90 * Math.PI / 180, (x * 3.6 - 90) * Math.PI / 180);
            this.ctx.stroke();
        }

        fillText(x) {
            this.ctx.font = "14px" + " Arial";
            this.ctx.fillStyle = "red";
            this.ctx.textBaseline = "middle";
            this.ctx.textAlign = "center";
            this.ctx.fillText(x.toFixed(1) + "%", this.width / 2, this.width / 2);
        }

        fill(x) {
            this.fillBg();
            this.fillArc(x);
            this.fillText(x);
        }

        testFn() {
            return this.ctx
        }

    }

    let cicle = new CircleProgress(ctxs, 100, 100, 10)

    cicle.fill(100)
Mar.05,2021

is not compiled. The browser does not recognize class


this.ctx.canvas.width = width
this.ctx.canvas.height = height
this.width = width
this.height = height
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c26e2b-33805.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c26e2b-33805.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?