duet-document-title
v2.0.0
Published
Get or set document.title from a duet app.
Downloads
8
Readme
duet-document-title
Get or set document.title from a duet app.
$ npm install duet-document-titleUsage
var duet = require('duet');
var channel = require('duet-document-title/channel');
var docTitle = require('duet-document-title');
duet([channel], function () {
docTitle('The Title');
docTitle(function (title) {
console.log(title);
// > 'The Title'
});
});API
docTitle(callback: Function)
Get the current value of document.title. The callback will be called with the title as the first argument.
docTitle(title: String [, callback: Function])
Set document.title. The optional callback will be called once it has been set.
