Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 637 Bytes

Readme.md

File metadata and controls

35 lines (22 loc) · 637 Bytes

chrome-events

tiny wrapper for chrome events, inspired by component/events

Installation

Install with component(1):

$ component install segmentio/chrome-events

Example

var events = require('chrome-events');

function App(){
  this.events = events(chrome.runtime, this);
  this.events.bind('installed');
  this.events.bind('startup');
  this.events.bind('suspend');
  this.events.bind('message');
}

App.prototype.oninstalled = function(){};
App.prototype.onstartup = function(){};
App.prototype.onsuspend = function(){};
App.prototype.onmessage = function(){};

License

MIT