Skip to content

Commit

Permalink
refactor: moved a script in a dedicated file
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloBar1 committed Jan 9, 2024
1 parent e085658 commit 1374828
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>

0 comments on commit 1374828

Please sign in to comment.