"Event Listeners" pane in the inspector doesn't update when removing Event Listeners from console
Reported by
alvarezs...@gmail.com,
Jan 10 2018
|
|||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3314.0 Safari/537.36
Steps to reproduce the problem:
1. Create a HTML document that contains a div for example:
<div id="remove">Test Div</div>
2. Attach to it the following javascript code
const listener = function () {
console.log("Event Fired")
}
document.querySelector('#remove').addEventListener('click', listener);
3. Open the HTML document from the browser select the layer in the inspector and then navigate to the Event Listeners browser in the dev HTMLFormControlsCollection
4. Without deselecting the object and leaving the event listener pane open, expand the console and type the following code:
document.querySelector('#remove').removeEventListener('click', listener)
5. You can observer the event is still in the event listener pane and its not remove unless you select other object in the DOM and then select again the layer.
What is the expected behavior?
For the event listeners in the pane to be updates live if the Event Listener is removed.
What went wrong?
The event listener, even if it has been removed from the console, is still present in the event listener pane in the inspector unless you loose focus from the element and come back.
Did this work before? No
Chrome version: 65.0.3314.0 Channel: n/a
OS Version: OS X 10.13.2
Flash Version:
,
Jan 11 2018
,
Dec 8
Thank you for the report. Monitoring changes to an element's listeners live is complex and we do not have the resources to address this. The Event Listener pane has a 'Refresh' button, which will update on click as a workaround. |
|||
►
Sign in to add a comment |
|||
Comment 1 by krajshree@chromium.org
, Jan 11 2018