Widget:Refresh

<script type="text/javascript">

  var api = new mw.Api();
  setTimeout(function(){
    var api = new mw.Api();

api.get( {

   action: 'expandtemplates',

text: '

'

} ).done ( function ( data ) {

   alert(data.expandtemplates['*']);

} );

  }, 3000);

</script>