Skip to content

Instantly share code, notes, and snippets.

@akb
Created October 11, 2012 23:08
Show Gist options
  • Save akb/3876190 to your computer and use it in GitHub Desktop.
Save akb/3876190 to your computer and use it in GitHub Desktop.
-------------------- native-conduit.coffee -------------------------
define ['backbone', 'underscore'], (Backbone, _) ->
return _(Backbone.Events).clone()
---------------------- addition to main.coffee ---------------------
define [...'app/native-conduit'...], (...nativeConduit...) ->
...
window.DRC_jsClient = nativeConduit.trigger
...
--------------------- Elsewhere in the code... ---------------------
define ['app/native-conduit'], (nativeConduit) ->
nativeConduit.on 'GuidedAccessDisabled', ->
console.log 'Event triggered: GuidedAccessDisabled'
@akb
Copy link
Author

akb commented Oct 11, 2012

ellipses are not literal and mean that there is already code here

@akb
Copy link
Author

akb commented Oct 11, 2012

and can we call it DRC_jsClient? It pains me that HTML gets all the credit for what is really JavaScript. HTML5 is 99% JS APIs and 1% new HTML tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment