D
D
Daniel2021-01-21 23:51:57
JavaScript
Daniel, 2021-01-21 23:51:57

Does it make sense to remove DOMContentLoaded listener after firing?

Does it make sense to DOMContentLoadedwrite his deletion in the body of a lisner removeEventListener?

He, in theory, works out once, and the listener remains
. So can he remove it so that it does not hang?

I heard that garbage collectors remove it in JS, is there any information on this?

Thanks to those who responded!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question