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

  • Home
  • SEARCH
  • 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 7909049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:13:32+00:00 2026-06-03T12:13:32+00:00

I am writing a script where I would like to handle mouse events only

  • 0

I am writing a script where I would like to handle mouse events only if they have not been handled by any other element before.

I can attach an event listener to the document object, but it will receive all events regardless of whether they have been already handled.

I have no control over the elements in the HTML page so I cannot manually stopPropagation() when the event is handled.

Any ideas?

  • 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-03T12:13:50+00:00Added an answer on June 3, 2026 at 12:13 pm

    From this article here.

    It seems its not yet possible to do this.

    Which event handlers are registered?

    One problem of the current implementation of W3C’s event registration
    model is that you can’t find out if any event handlers are already
    registered to an element. In the traditional model you could do:

    alert(element.onclick)

    and you see the function that’s registered to
    it, or undefined if nothing is registered. Only in its very recent DOM
    Level 3 Events W3C adds an

    eventListenerList

    to store a list of event
    handlers that are currently registered on an element. This
    functionality is not yet supported by any browser
    , it’s too new.
    However, the problem has been addressed.

    Fortunately

    removeEventListener() 
    

    doesn’t give any errors if the event
    listener you want to remove has not been added to the element, so when
    in doubt you can always use removeEventListener().

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

Sidebar

Related Questions

Can these be done without writing any server side code? Would like to handle
I'm writing a script in Groovy and I would like someone to be able
I am writing a script that uses a temporary directory, and I would like
I'm writing a Ruby script and would like to use a n-ary tree data
I have a unique design question. Basically I'm writing a chat script and would
I am writing my first shell script. In my script I would like to
I'm writing a Perl script and would like to use a n-ary tree data
I'm writing a quick and dirty maintenace script to delete some rows and would
I'm writing script in remote.ini The script looks like on 1:start:{ server some.irc.server server
I am writing a script that checks if given domain is parked or not.

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.