blob: d4cc91965f864768fd120e03b3d8fe9eef94ad16 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import Mustache from 'mustache';
var template;
var controls = [
{ id: 'MAIN', name: 'Main', volume: 50 },
];
function render_sliders(sliders) {
var sliderContainer = document.getElementById('SliderContainer');
for( var i=0; i<sliders.length; i++) {
var node = Mustache.render(template, sliders[i]);
sliderContainer.innerHTML += node;
console.log(sliderContainer.innerHTML)
}
}
export function init() {
template = document.getElementById('slider-template').innerHTML;
render_sliders(controls);
}
|