
elm.ports.download.subscribe(x => download(x));

function download(value) {
    const a = document.createElement('a');
    const blob = new Blob([JSON.stringify(value, null, '    ')], { type: 'application/json' });
    const url = URL.createObjectURL(blob);
    a.setAttribute('href', url);
    a.download = 'JSON Schema';
    a.click();
}

setTimeout(() => {

    document.body.addEventListener('dragstart', () => {
        console.log('drag started');
    });
    document.body.addEventListener('dragover', e 