skip to Main Content

Custom HTML element is not rendered on the screen while successfully being rendered in the HTML tree

I created a custom HTML element: class PieChart extends HTMLElement { constructor() { super(); } init() { this.#render(); } #render() { const circleElement = document.createElement("circle"); circleElement.setAttribute("cx", 100); circleElement.setAttribute("cy", 100); circleElement.setAttribute("r", 80); circleElement.setAttribute("fill", "none"); circleElement.setAttribute("stroke", "green"); circleElement.setAttribute("stroke-width", 40); circleElement.setAttribute("stroke-dasharray", `502.85 502.85`);…

VIEW QUESTION
Back To Top
Search