Skip to content

Instantly share code, notes, and snippets.

@RyanHope
Created February 3, 2012 02:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RyanHope/1727360 to your computer and use it in GitHub Desktop.
Save RyanHope/1727360 to your computer and use it in GitHub Desktop.
Enyo Hybrid Kind that works on all webOS Devices
enyo.kind({
name: 'Hybrid2',
kind: enyo.Hybrid,
rendered: function() {
this.pluginReady = false;
if (this.hasNode()) {
if (this.passTouchEvents) {
this.node.addEventListener("touchstart", this.nullTouchHandler);
this.node.addEventListener("touchend", this.nullTouchHandler);
this.node.addEventListener("touchmove", this.nullTouchHandler);
}
this.node.ready = enyo.bind(this, this.pluginStatusChangedCallback, 'ready')
this.deferredCallbacks.forEach(function(cb) {this.node[cb.name] = cb.callback;}, this);
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment