Skip to content

Instantly share code, notes, and snippets.

View chchrist's full-sized avatar

Tolis Christomanos chchrist

View GitHub Profile
@chchrist
chchrist / authenticatorExt.js
Last active February 29, 2016 17:38
cometd postpone handshake
'use strict';
import $ from 'jquery';
class AuthenticatorExt {
constructor(options) {
this.tokenUrl = options.tokenUrl;
this.memberId = options.memberId;
this.isPendingHanshake = false;
@chchrist
chchrist / bbviewpubpattern.js
Created April 18, 2012 11:08 — forked from krawaller/bbviewpubpattern.js
Backbone Sanitary View Publishing Pattern
/*
S A N I T A R Y V I E W P U B L I C A T I O N P A T T E R N
This pattern adresses three issues; memory leaks, involuntarily allowing unwanted event listeners to live
on, and the cumbersome process of publishing a view to the page. The first two issues are dealt with through
making sure that previously published views are removed properly, and not merely have their html
overwritten. And, as will see, the solution to fixing the removal process will also mean a streamlining
of the publication process!
We do this through the use of two mixin modules; one for our views, and one for our router.