2018-03-05 00:44:17 +00:00
|
|
|
console.log("app.js loaded");
|
|
|
|
|
|
|
|
var getTemplateHtml = template => {
|
2018-03-05 01:06:06 +00:00
|
|
|
document.getElementById('iframe').src = "about:blank";
|
|
|
|
fetch('template/'+template+'.html')
|
2018-03-05 00:44:17 +00:00
|
|
|
.then(function(response) {
|
|
|
|
return response.text()
|
|
|
|
})
|
|
|
|
.then(function(html) {
|
|
|
|
document.getElementById('iframe').contentWindow.document.write(html);
|
2018-03-05 01:06:06 +00:00
|
|
|
console.log(document.getElementById('iframe').contentWindow.document)
|
2018-03-05 00:44:17 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
var valueChange = value => {
|
|
|
|
var iframehtml = document.getElementById('iframe').contentWindow.document.getElementById(value);
|
|
|
|
val = document.getElementById(value).value;
|
|
|
|
iframehtml.innerHTML = val
|
|
|
|
}
|