Javascript Detect All Images (Including Asynchronous)

Posted by Zach on Stack Overflow See other posts from Stack Overflow or by Zach
Published on 2010-04-26T02:24:35Z Indexed on 2010/04/26 2:33 UTC
Read the original article Hit count: 290

Is there a way in javascript to detect all images in a document, including those that may be loaded asynchronously (and maybe after the DOM is ready)?

I'm looking to create a function that can detect if Google Analytics has been loaded by searching through the DOM looking for "__utm.gif". document.images doesn't seem to hold this image as it's loaded asynchronously and not displayed.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about asynchronous