Skip to content

Instantly share code, notes, and snippets.

@poteto
Created April 17, 2015 22:09
Show Gist options
  • Save poteto/f680f83cfeed0aebef83 to your computer and use it in GitHub Desktop.
Save poteto/f680f83cfeed0aebef83 to your computer and use it in GitHub Desktop.
_bindListeners(context=null, event=null) {
Ember.assert('You must pass a valid context to _bindListeners', context);
Ember.assert('You must pass a valid event to _bindListeners', event);
const elementId = get(this, 'elementId');
Ember.warn('No elementId was found on this Object, `viewportSpy` will' +
'not work as expected', elementId);
$(context).on(`${event}#${elementId}`, () => {
this._scrollHandler(context);
});
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment