Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7954711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:30:49+00:00 2026-06-04T03:30:49+00:00

Can anyone point me to the documentation of the html Event object? Bonus Reading

  • 0

Can anyone point me to the documentation of the html Event object?


Bonus Reading

The only reason i know a global Event object exists is because it was mentioned in a Stackoverflow answer:

onclick="SomeEvent(this, event)"

function SomeEvent( el, event ) {
    var target = event.srcElement || event.target;

    if( el === target ) {
        // run your code
    }
}

Where it seems to have the properties:

  • srcElement
  • target

Googling around i found W3 School’s page on the HTML DOM Event object, which lists the following properties:

  • bubbles: Returns whether or not an event is a bubbling event
  • cancelable: Returns whether or not an event can have its default action prevented
  • currentTarget: Returns the element whose event listeners triggered the event
  • eventPhase: Returns which phase of the event flow is currently being evaluated
  • target Returns the element that triggered the event
  • timeStamp Returns the time (in milliseconds relative to the epoch) at which the event was created – type Returns the name of the event

and methods:

  • initEvent(): Specifies the event type, whether or not the event can bubble, whether or not the event’s default action can be prevented
  • preventDefault(): To cancel the event if it is cancelable, meaning that any default action normally taken by the implementation as a result of the event will not occur
  • stopPropagation(): To prevent further propagation of an event during event flow

It’s missing srcElement, so it’s safe to say it’s not complete documentation.


Then there’s Microsoft’s page on the event object. It doesn’t have any documentation; only mentioning the object. But it does mention that:

some properties might not have meaningful values during some events. For example, the fromElement and toElement properties

W3Schools page doesn’t mention fromElement or toElement properties; so it’s not complete.

The MSDN page references a link to W3C:

Standards information

Document Object Model (DOM) Level 2 HTML Specification, Section 1.6.5

A search of that page contains no mention of fromElement or toElement.

So can anyone point me to documentation of the html Event object?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T03:30:51+00:00Added an answer on June 4, 2026 at 3:30 am

    The MDN site provides very reliable information: https://developer.mozilla.org/en/DOM/event. Your event.toElement property is a non-standard Microsoft thing, a quick test showed undefined for the property in Firefox:

    <body onclick="alert(event.srcElement)">Click
    

    The correct property to use is target. Also note that event is not global, it is only a local variable. You are suggested to use addEventListener for adding DOM events as described in the MDN page.

    quirksmode.org has nice tables on compatibility across browsers.

    W3schools… well http://w3fools.com

    Since you want to know more about the IE-specific srcElement property, consult Microsofts documention. From srcElement property:

    Gets the element that the event was originally dispatched to. Compare to target.

    Remarks

    Note The srcElement property is provided for backward compatibility. Use the target property instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone point me to some documentation about how I can use an Iso
Can anyone point me towards some good documentation / code examples on how best
Can anyone point me in the direction of a documentation page for jQuery's AjaxUpload()
Can anyone point me to any guides, howto's or general documentation on how to
Can anyone point me to documentation on the SL4 features included in WP7?
Can anyone point me to the documentation on how to make Instruments run UIAutomation
Can anyone point me in the direction of documentation for exposing a DAO as
Can anyone point me in the right direction for some documentation about handling WPF
Can anyone point me to any sort of documentation for how to implement binary
Can anyone point me towards documentation on this? I'm using Devise + CanCan in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.