Pass current type of scripts to callback method