I am developing a Firefox add-on. It basically parses the HTML document after it loads in the browser. I am able to capture events like form submission, link clicked etc. However when a HTML pages silently submits via an AJAX call and partially gets updated, I am unable to capture them – hence as such how can I trap a web page AJAX request / response in an add-on?
Share
While you can try detecting the AJAX call – what you really want to detect are page modifications it seems. You can use mutation observers (introduced in Firefox 14) for that. For example:
The function
onDocumentChangewill be called whenever changes are made to the content document.