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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:42:02+00:00 2026-06-11T09:42:02+00:00

I am working on a complex web app. In it, there is a div

  • 0

I am working on a complex web app.

In it, there is a div which gets updated.
It prints something like:

[1/4]
[2/4]
[3/4]
[4/4]

Probably some JavaScript somewhere is updating with something like:

div.innerHTML = "[2/4]"; 

My question is:

Can I somehow intercept/(listen to) innerHTML changes so that I could monitor how long they take?

I am in a position where I could inject any JavaScript and I would like to collect something like:

console.log("1/4 has been called at timestamp");
console.log("2/4 has been called at timestamp");
console.log("3/4 has been called at timestamp");
...
  • 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-11T09:42:03+00:00Added an answer on June 11, 2026 at 9:42 am

    You might be able to use Mutation Events to do this if the browsers you are targeting support them. Here is a small jsFiddle demo that should work in a browser that supports the Mutation Events. I tested this in Chrome 23

    JavaScript:

    var observable = document.getElementById('observable');
    
    observable.addEventListener('DOMSubtreeModified', function(ev) {
      console.log(ev.target.nodeValue, ev.timeStamp);
    }, false);
    
    var i = 0;
    
    observable.addEventListener('click', function(ev) {
        observable.innerHTML = ++i;
        return false;
    }, false);​
    

    HTML:

    ​<div id="observable">click me and look at the console</div>​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​
    

    CSS:

    ​#observable {
        background-color:lightblue;
        height:42px;
    }​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am working with a complex application and like to know which files it
I'm working on a web application in ASP.NET MVC which involves a fairly complex
I'm working on automated tests with Selenium for a complex, enterprise-grade web app, and
Context I am working on a pretty complex web site framework which includes a
I'm working on a pretty complex web application in Ext with Google maps API
I'm currently diving into Backbone.js, and working on a few complex web apps. I've
I'm working on my first very complex JQuery based application. A single web page
I am working with some complex queries using the dynamic find_all method and reached
I've been working on a complex app with one main dashboard. I don't particularly
I am working on a relatively complex JavaScript-driven website. It runs great in all

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.