Does window.location.href have callback functions for successful and failed jumps?

scenario: download introduction page written by html. Download needs to be triggered automatically after loading.

however, on iOS systems, the download will pop up a pop-up box whether or not to allow it.

so the question is, how does js monitor users to choose and cancel downloads?

where the logic that automatically triggers the download is

window.location.href = "itms-services://xxxxx/lhb.plist";

the box will pop up after running

Mar.24,2021

this can't be controlled. Do you want to count when monitoring users choose to download and cancel downloads? Then simulate a pop-up box to count..

Menu