import { Chain } from 'ranuts';const list = new Chain('ul').addChild([ new Chain('li').setTextContent('項目 1'), new Chain('li').setTextContent('項目 2'), new Chain('li').setTextContent('項目 3'),]);document.body.appendChild(list.element);
import { Chain } from 'ranuts';const svg = new Chain('svg').setAttribute('width', '100').setAttribute('height', '100');const circle = new Chain('circle').setAttribute('cx', '50').setAttribute('cy', '50').setAttribute('r', '40');svg.addChild(circle);