Edit in JSFiddle

Q.delay(1000)
  .thenResolve('I love Q!')
  .then(function (msg) {
     alert(msg);
  });

              
            
          
            
              
                

              
            
          
            
              

External resources loaded into this fiddle: