index.js 538 B

12345678910111213141516171819202122
  1. import { init, attributesModule, h } from "../../build/index.js";
  2. const patch = init([attributesModule]);
  3. window.addEventListener("DOMContentLoaded", () => {
  4. const container = document.getElementById("container");
  5. const vnode = h("div", [
  6. h("svg", { attrs: { width: 100, height: 100 } }, [
  7. h("circle", {
  8. attrs: {
  9. cx: 50,
  10. cy: 50,
  11. r: 40,
  12. stroke: "green",
  13. "stroke-width": 4,
  14. fill: "yellow",
  15. },
  16. }),
  17. ]),
  18. ]);
  19. patch(container, vnode);
  20. });