I have two HTML pages; main.html and result.html.
main.html:
    <img id="preview" src="" alt="">
    <button id="done" type="button">done</button>
result.html:
    <img id="search" src="" alt="">
In main page, I upload an image and the preview is shown in preview of main. And then I cropped this image using cropper js module.
crop.js:
const done = document.getElementById('done');
const imgcropped = document.getElementById('img-cropped');
done.addEventListener('click', (e) => {
    imgcropped.src = cropper.getCroppedCanvas().toDataURL();
})
I want to get imgcropped.src to the search.src in result. How can I get the main image to the result?
 
     
    