mirror of
https://github.com/leptos-rs/book.git
synced 2025-12-27 07:35:38 -05:00
14 lines
382 B
JavaScript
14 lines
382 B
JavaScript
(() => {
|
|
const boxes = document.querySelectorAll("details.admonish-sandbox");
|
|
boxes.forEach((box) => {
|
|
const once = () => {
|
|
const template = box.querySelector("template");
|
|
const sandbox = template.content.cloneNode(true);
|
|
template.after(sandbox);
|
|
|
|
box.removeEventListener("toggle", once);
|
|
};
|
|
box.addEventListener("toggle", once);
|
|
});
|
|
})();
|