Page 1 of 1

dontPreloadImage

Posted: 20 July 2017, 16:33
by galehar
Hello,

I have some graphics which are specific to an extension. So I'd like to use dontPreloadImage to avoid loading it if the extension isn't used. However, I'm not sure how it works. The doc only says to do

Code: Select all

this.dontPreloadImage( 'cards.png' );
But where to put this? In the js constructor? And how does the loading occurs, is it automatic whenever the image is displayed? How do I test that the image isn't preloaded?

Thanks.

Re: dontPreloadImage

Posted: 21 July 2017, 00:26
by Victoria_La
Yes its in the constructor. I don't know how to test it, maybe it will be loaded faster

Re: dontPreloadImage

Posted: 21 July 2017, 13:45
by Morgalad
The network debug in chrome or FF would show you all the REST calls for GET, chek what your browser is requesting:

Image