From df1beb58d91a1876541eb0677bb111b1edb08b82 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Mon, 26 May 2014 16:51:58 -0700 Subject: [PATCH] Add tutorial entry about pins --- tutorial.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tutorial.html b/tutorial.html index a9cb637..1abb4d4 100644 --- a/tutorial.html +++ b/tutorial.html @@ -122,6 +122,18 @@ cosmo.subscribe('testsubject', 1).then(function() {
  • Your test page should generate an alert popup showing the last message sent
  • +

    Pin a value

    + +
      +
    1. Pins publish a message temporarily, until the source conncetion disconnects. This can be used for presence information
    2. +
    3. Open the debug interface and subscribe to testsubject
    4. +
    5. Change your test script: +
      var cosmo = new Cosmopolite();
      +cosmo.pin('testsubject', 'browser is alive!');
    6. +
    7. Load the test page and watch the debug page; you should see the pin.
    8. +
    9. Close the test page, and the pin disappears.
    10. +
    +