// We have loaded the large png with id "big". We want to test if it will be
// kicked out of the cache and thus have to be reloaded, but to ensure that, we
// need to get the cache to look at what is there. So we load another image,
// this one small.
function loadSmall()
{
// Trivial check, for reference.
is(document.getElementById("big").width, 3000, "HTML 'big' image width after page onload()");
function smallLoaded()
{
jsBig.src = document.getElementById("big").src;
// Check that it is not needed to wait for onload().
is(jsBig.width, 3000, "JS 'big' image width before its onload()");
// Check again after onload(), for reference.
jsBig.onload = jsBigLoaded;
}
function jsBigLoaded()
{
is(jsBig.width, 3000, "JS 'big' image width after its onload()");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.