Fmdpa Posted April 1, 2011 Share Posted April 1, 2011 I'm working on a project where I need to detect whenever the page is updated asynchronously. How could I do that? Link to comment Share on other sites More sharing options...
ShadowMage Posted April 1, 2011 Share Posted April 1, 2011 Couldn't you just add a function call to your readystatechange function?Something like: httpReq.onreadystatechange = function() { if (httpReq.readState == 4) { //Do something pageUpdated(); }} Link to comment Share on other sites More sharing options...
jeffman Posted April 1, 2011 Share Posted April 1, 2011 whenever the page is updated asynchronouslyWhat exactly is happening? Link to comment Share on other sites More sharing options...
ShadowMage Posted April 1, 2011 Share Posted April 1, 2011 What exactly is happening?Are there ways this happens other than AJAX? Link to comment Share on other sites More sharing options...
jeffman Posted April 1, 2011 Share Posted April 1, 2011 You don't update a PAGE with AJAX, but asynchronously implies AJAX. So I want to clear on what we're trying to solve. Link to comment Share on other sites More sharing options...
ShadowMage Posted April 1, 2011 Share Posted April 1, 2011 You don't update a PAGE with AJAXTrue you are not requesting a new page, but if you update several elements on the page, would you not say that you are updating the page? Link to comment Share on other sites More sharing options...
jeffman Posted April 1, 2011 Share Posted April 1, 2011 What I might say doesn't matter. I just want to be sure I know what Fmdpa means. Link to comment Share on other sites More sharing options...
Fmdpa Posted April 1, 2011 Author Share Posted April 1, 2011 Sorry I didn't give the context. I'm building a web browser extension, so I need a way of dynamically intercepting all asynchronous updates to the page. Link to comment Share on other sites More sharing options...
Fmdpa Posted April 1, 2011 Author Share Posted April 1, 2011 To explain further...Here's a link to the extension. But it does not work on Twitter since navigation is asynchronous. I need a way of detecting AJAX requests so I can re-filter the page. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.