Skip to content

Instantly share code, notes, and snippets.

@valueof
valueof / view.fatarrows.js
Created June 6, 2012 00:50
Backbone view that initializes a third-party JavaScript app, attaches a couple of listeners and sends a signal back to the parent page: with and without fat arrows.
var Lounge = Backbone.View.extend({
initialize: function (options) {
// ...
Bus.listen('window.inViewport', () => {
this.states.inViewport = true;
this.trigger('inViewport');
});
Bus.listen('window.scrollOffViewport', () => {