If you want to discover the nodes created by AJAX, your parameters (besides the Mutation events that you are wise to exclude):
- Poll with an interval or timer.
- Trying to connect to AJAX requests on a page (if any).
- Enabling, capturing, or replacing javascript pages.
I did it all in one go, and all but one have serious flaws:
- javascript ( ), , , . javascript .
- AJAX , , .
- , , , .
waitForKeyElements() .
. :
function highlightGoodComments (jNode) {
if (/beer/i.test (jNode.text () ) ) {
jNode.css ("background", "yellow");
}
}
waitForKeyElements ("#userBlather div.comment", highlightGoodComments);