test
parent
e0a3e301b8
commit
cbe0502452
|
@ -353,6 +353,8 @@ body {
|
|||
<script src="{{ 'anime.min.js' | asset_url }}" defer="defer"></script>
|
||||
<script async src="{{ 'dotlottie-player.js' | asset_url }}"></script>
|
||||
|
||||
{% render 'shx-product-desc'
|
||||
, content_type: 'init' %}
|
||||
|
||||
</head>
|
||||
|
||||
|
|
|
@ -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 %}
|
Loading…
Reference in New Issue