getEventListeners(window)
will return a map of events and their registered event listeners.
So for DOMContentLoaded
event for example you can have many event listeners. If you know the index of the listener you want to remove (or if there exists only one), you can do:
var eventlistener = getEventListeners(window)["DOMContentLoaded"][index];
window.removeEventListener("DOMContentLoaded",
eventlistener.listener,
eventlistener.useCapture);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…