class ThemeAdapter implements eui . IThemeAdapter { param url param compFunc param errorFunc param thisObject public getTheme ( url , compFunc , errorFunc , thisObject ) { function onGetRes ( e ) { compFunc . call ( thisObject , e ) ; } function onError ( e ) { if ( e . resItem . url == url ) { RES . removeEventListener ( RES . ResourceEvent . ITEM_LOAD_ERROR , onError , null ) ; errorFunc . call ( thisObject ) ; } } RES . addEventListener ( RES . ResourceEvent . ITEM_LOAD_ERROR , onError , null ) ; RES . getResByUrl ( url , onGetRes , this , RES . ResourceItem . TYPE_TEXT ) ; } }