From 13748289633373de791c39e03094c612914d762c Mon Sep 17 00:00:00 2001 From: Carlo Barone <carlo.barone@neovici.se> Date: Tue, 9 Jan 2024 09:40:31 +0100 Subject: [PATCH] refactor: moved a script in a dedicated file --- examples/index.html | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/examples/index.html b/examples/index.html index cf3b44a..03bff09 100644 --- a/examples/index.html +++ b/examples/index.html @@ -90,19 +90,6 @@ <h2>Displaying node 'Company Ktwoktqtxv' with no-wrap</h2> </div> </div> - <script type="module"> - import { DefaultTree } from '@neovici/cosmoz-tree/cosmoz-default-tree.js'; - - const elements = document.querySelectorAll('cosmoz-treenode'); - - fetch('tree.json') - .then((r) => r.json()) - .then((jsonTree) => { - const tree = new DefaultTree(jsonTree); - elements.forEach((el) => { - el.ownerTree = tree; - }); - }); - </script> + <script type="module" src="./script.js"></script> </body> </html>