-
Notifications
You must be signed in to change notification settings - Fork 1
/
interaction-template.js
46 lines (32 loc) · 1.04 KB
/
interaction-template.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
'use strict';
export default class InteractionTemplate extends HTMLElement {
static name = "Template"
static icon = "imagesmode"
//msg contains information provided from cue creation
constructor(msg, callback) {
super();
this.shadow = this.attachShadow({ mode: 'open' });
const container = document.createElement('template');
// creating the inner HTML of the editable list element
container.innerHTML = `
<style>
</style>
<div id="content">
Hello World
</div>
`;
//background-image: url("${this.mediaPath}");
this.shadow.appendChild(container.content.cloneNode(true));
//callback gives control panel the chance to see that the cue was activated on the phone
callback({status: "ok"})
}
// fires after the element has been attached to the DOM
connectedCallback() {
}
static createFields(form){
//create your Inputfields for the Cue Creation dislog here
//and attach to form
//best use helper classes in CustomInput.js
}
}
customElements.define('interaction-template', InteractionTemplate);