Hi people! In this lesson we are going to talk about event model that how can we add or remove events in our projects. In previous lesson we talk about Dom level zero event handler and we found also a problem there that they can easily overwrite by us and can stop the all function so how can we sought out this problem by using Standard Event Model, let see.
We can use this function for remove or disabled our event handler. This is nice one line code.
Note : While using removeEventListener we have to mention function name into second argument if we use direct function so it may be not going to work because while we pass direct function into it than it search same objects and it can be possible that developer done any mistake while passing the same function who we already add in addEventListener. So always remember to use function name in it.
Passing the function name is right way, not function its self.
It's prevent the default action of the event and forward element than event is fired off. Mainly use for stop functionality of event without reject to function.