explicitOriginalTarget property (event)
Returns a reference to the exact object on which the event originally occurred.
The explicitOriginalTarget is similar to the originalTarget and target properties, but sometimes they retrieve the parent element of the exact target object.
For example, if a span element contains some text (in that case, the span element has a TextNode child) and an onclick event occurs within the span element, then the explicitOriginalTarget property retrieves the TextNode, while the originalTarget and target properties return the span element as the target.
The explicitOriginalTarget and originalTarget properties are only supported by Firefox, but the target property can be used in Firefox, Opera, Google Chrome, Safari and Internet Explorer from version 9. In earlier Internet Explorer versions, use the srcElement property for similar functionality.
You can find the related objects in the Supported by objects section below.
This property is read-only.
Reference to the exact object on which the event originally occurred.
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the explicitOriginalTarget property:
Did you find this example helpful?
User Contributed Comments