Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Java Script

Public visualization

Java Script

0 stars0🌍 Public
Sslyfer-cell
Last edited Jun 5, 2022
Created on Jun 5, 2022
Forked from SVG fundamentals

This example displays a blank, fixed-size SVG canvas. It creates an SVG element and appends it to the document body, then attempts to add a 100-by-100 pixel rectangle. The code uses the native DOM APIs `document.createElementNS` and `setAttribute` for SVG construction, but the rectangle is mistakenly appended to `svg.body` rather than the SVG root, so the rectangle never renders. The visualization ultimately shows only an empty 960×500 viewport.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed