platform.registerBackButtonAction() for web apps?

Is there a way to attach a handler to the user pressing the back button in the browser? ionic-angular 3.5 and 3.6 contain a lot of navigation functionality, but I haven’t seen anything about this. Looking at platform.registerBackButtonAction(), it seems this is only for apps running through Cordova. Is there a way to call some side effect function when the users presses the back button from a certain page?