pull/1/head
Jan Umbach 2024-05-30 11:16:20 +02:00
parent e0a3e301b8
commit cbe0502452
2 changed files with 26 additions and 0 deletions

View File

@ -353,6 +353,8 @@ body {
<script src="{{ 'anime.min.js' | asset_url }}" defer="defer"></script> <script src="{{ 'anime.min.js' | asset_url }}" defer="defer"></script>
<script async src="{{ 'dotlottie-player.js' | asset_url }}"></script> <script async src="{{ 'dotlottie-player.js' | asset_url }}"></script>
{% render 'shx-product-desc'
, content_type: 'init' %}
</head> </head>

View File

@ -0,0 +1,24 @@
{% assign content_type = content_type | default: 'awdawd' %}
{% if content_type == 'init' %}
<script type="text/javascript">
// create new html tag called "shx-drehteller"
class MyCustomElement extends HTMLElement {
constructor() {
super();
// element functionality written in here
}
connectedCallback() {
this.attachShadow({ mode: 'open' }); // Attach a shadow root to the element.
this.shadowRoot.innerHTML = `<div>Hello, world!</div>`; // Add a div to the shadow DOM.
}
}
customElements.define('shx-drehteller', MyCustomElement);
</script>
{% endif %}