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 6946145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:31:38+00:00 2026-05-27T13:31:38+00:00

If we want a callback while the user clicks a button, we just simply

  • 0

If we want a callback while the user clicks a button, we just simply type
btn.addEventListener('click', callback)

The question I want to figure out is this: how can it work? How to do that?

Did the browser add a thread that continued checking for it (that’s obviously not the case, since it consumes lots of resources).

Or did the browser inside use some kind of server push-technology or something else?

  • 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-05-27T13:31:38+00:00Added an answer on May 27, 2026 at 1:31 pm

    To simplify the description, let’s just say the browser has a general “mouse click event” on it’s whole application canvas, then figures out which element on the screen is at that position and fires the appropriate click event for that element.

    Here’s an article about WebKit internals that goes more in details on how browsers parse, DOM, events, etc…

    Is that what you are looking for? What exactly are you trying to accomplish?

    Hope this helps

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

Sidebar

Related Questions

I want to call a callback method that may or may not be implemented
I want to do a one time callback registration within Observer. I don't want
I want to get hold of the mouse position in a timeout callback. As
I want to tell hibernate to give me a callback notification when a new
I want to use this function EnumWindows(EnumWindowsProc, NULL);. The EnumWindowsProc is a Callback function:
Eg. I have following delegate method I want to use as a callback function
What's the best way to implement user controls that require AJAX callbacks? I want
I want to alert the user whenever there's an AJAX error. You can do
I am creating a web user control for showing Alert on AspxGridView Columns(Delete/Edit) click
I have a set of data which I want to display to the user

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.