0

I have action event click on a button in Javascript. If I click the button 2 times, the function handler of the action perform simultaneously or sequence? (the time between 2 click is faster than the function handler execution time).

1 Answer 1

1

Your functions never run in parallel. When an event occurs, the user thread is awoken to execute the registered handler and only when your function finishes may the other function be called.

If you don't use webworkers, you never have two of your functions running at the same time in a page.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.