Issue
In the W3C specification event is written that an event type is an object with a name, properties etc. and so "click" is a type and not the name. But after, for example, when it speaks about
createEvent
method it says that it creates an event of type UIEvent, Event, etc.
So what's the correct terminology? A "click" is a type or a "click" is the name of an event of type MouseEvent?
I think is correct to say the last!
Solution
I think "MouseEvent" is a type of an event which describes the structure (properties) of event objects. For the purposes of this answer, let's call it its DOMInterface type
Then "click" is also a type of an event which describes what happened. Let's call this its "happened" type.
Unfortunately, the DOM spec doesn't always clearly distinguish between DOMInterface types and "happened" types, though in most places event type
means its "happened" type, while its DOMInterface type is simply referred to as the event's DOMInterface.
So I'd say that "click" is the name of the type of the event whose DOMInterface is that of "MouseEvent". But in some cases, the usage of event type
may be context dependent, and you may need to be explicit about the kind of type you're referring to.
Answered By - Alohci
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.