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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:44:20+00:00 2026-05-15T00:44:20+00:00

I want to compare the change of a DOM node after a user event

  • 0

I want to compare the change of a DOM node after a user event is fired on it; but I don’t know on which element a user would fire, so my idea is to (1) save the DOM tree before an event and (2) compare the saved tree with the updated DOM tree when an event is fired.

My question are
(1) is there any better way? and
(2) if there is no other way, what would be the fast algorithm to compare two DOM trees?

  • 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-15T00:44:21+00:00Added an answer on May 15, 2026 at 12:44 am

    Since events bubble up, you could simply attach an event listener to the window object which catches all events, regardless of where they originated. You can examine the passed event object for event.target to see where it originated.

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

Sidebar

Related Questions

I'm new ios developer, I want to compare and change attributes Array1 = (object1,object2,
Worksheet_Change triggers when a cell value is changed (which is what I want), but
I want to compare a column in table a and table b If the
I want to compare them: both of gems have advantages and disadvantages. For example
I want to compare count of operations of the sorting algorithms Merge Sort and
I want to compare the alpha channel from one image to ~1000 other images.
I want to compare two strings for equality when either or both can be
I want to compare the first few bytes in byte[] with a string. How
I want to compare records between 2 databases on my SQL 2008 Server. The
We want to compare general performance (CPU, I/O, network, ...) of different JVMs for

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.