You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
376 B
JavaScript

const form = document.querySelector("form");
const container = document.querySelector("#panel-container");
const svg = container.querySelector("svg").outerHTML;
let panel = new Panel(svg, container);
form.addEventListener("submit", (e) => {
e.preventDefault();
form.querySelector("[name=cables]").value = container.querySelector(".cables").outerHTML;
form.submit();
});