removePopStateListener method
override
Unregisters the given listener (added by addPopStateListener) from the
popstate
event.
See: https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate
Implementation
@override
void removePopStateListener(EventListener fn) {
assert(
_popStateListenersCache.containsKey(fn),
'Removing a listener that was never added or was removed already.',
);
domWindow.removeEventListener('popstate', getOrCreateDomEventListener(fn));
_popStateListenersCache.remove(fn);
}