Post chrome version 85 the blur event which used to occur if the custom protocol is registered does not occur. Hence I'm trying to find out if there is any way in which I could catch the err thrown when I try to change the window location. I want to stop the download if the protocol is registered and if it's not then continue the download.
window.location.href = "my=protocol://"
as shown in chrominum source