Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A Javascript custom events micro-framework

branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time


Pub Mix

A custom events micro-framework. Note: this does not handle DOM events, just user defined ones.


In your browser

Bind custom events to any object

PubMix.on(window, "userStateChanged", function (user) { console.log("The user is now ",; })

.. later, "userStateChanged", [{name: "Rob"}])

With Ender

ender -b qwery,pub-mix

Using a selector engine

var ns = {}

function handleClickedCell () {}

$(ns).on("cellClicked", handleClickedCell)


$(ns).off("cellClicked", handleClickedCell)

Directly from ender or $

$.on(ns, "anything", function(){})

From node

npm install pub-mix

var pubmix = require("pub-mix")

pubmix.on(anything, "something", function(){})

Run the tests

sudo npm install --global zap

zap test.js

Some Docs

Bind an event listener

PubMix.on(namespace, eventName, function)

Trigger an event listener, eventName[, [arg1, arg2, ...]])

Unbind an event listener, eventName, function)

No Conflict

var myNamedPubMix = PubMix.noConflict()

Something went wrong with that request. Please try again.