duet-document-title

1.0.2 • Public • Published

duet-document-title

Get or set document.title from a duet app.

$ npm install duet-document-title

Usage

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.

Readme

Keywords

none

Package Sidebar

Install

npm i duet-document-title

Weekly Downloads

1

Version

1.0.2

License

ISC

Last publish

Collaborators

  • colingourlay