Instead of imageElement.src = myImage;
you should use window.location = myImage;
And even after that the browser will display the image itself. You can right click and use "Save Link" for downloading the image.
Check this link for more information.