Remove JSON download functionality from App.vue and implement it in parent.html
This commit is contained in:
parent
1341a32484
commit
e0954a34e7
@ -48,7 +48,10 @@
|
||||
}]
|
||||
};
|
||||
window.addEventListener('message', (event) => {
|
||||
console.log(event.data);
|
||||
const elem = document.createElement('a');
|
||||
elem.href = 'data:text/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(event.data));
|
||||
elem.download = 'results.json';
|
||||
elem.click();
|
||||
});
|
||||
window.onload = () => {
|
||||
const iframe = document.getElementById('iframe');
|
||||
@ -64,7 +67,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<iframe
|
||||
src="/index.html"
|
||||
src="index.html"
|
||||
style="width: 99vw; height: 95vh; border: none;"
|
||||
id="iframe"></iframe>
|
||||
</body>
|
||||
|
@ -162,10 +162,6 @@ export default {
|
||||
ended: new Date().getTime(),
|
||||
results
|
||||
}, window.origin);
|
||||
const elem = document.createElement('a');
|
||||
elem.href = 'data:text/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(results));
|
||||
elem.download = 'results.json';
|
||||
elem.click();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user