diff --git a/tutorial.html b/tutorial.html index df0a3a8..a9cb637 100644 --- a/tutorial.html +++ b/tutorial.html @@ -116,8 +116,8 @@ cosmo.subscribe('testsubject');
  • Change your test script:
    var cosmo = new Cosmopolite();
     cosmo.subscribe('testsubject', 1).then(function() {
    -  var msgs = cosmo.getMessages('testsubject');
    -  alert(msgs[msgs.length - 1]['message']);
    +  var msg = cosmo.getLastMessage('testsubject');
    +  alert(msg['message']);
     });
  • Your test page should generate an alert popup showing the last message sent