title: Using defprotocol to create javascript object
body: <p>Given I've defined a protocol</p>
  
  <pre><code>(defprotocol SubscriptionListener
    (onConnection [cid] "")
    (onUpdate [cid data] ""))
  </code></pre>
  
  <p>And I am interacting with a library in which a javascript object with this interface is passed in as follows</p>
  
  <pre><code>(js/somelib.connect url listener)
  </code></pre>
  
  <p>Is there an easy way to create a javascript object using the defined protocol?</p>
  
  <p>I have tried to <code>reify</code> the protocol:</p>
  
  <pre><code>(js/somelib.connection "localhost" (reify SubscriptionListener
                                        (onConnection [cid] (println cid))
                                        (onUpdate [cid data] (println data))))
  </code></pre>
  
  <p>However this does not give an object that is compatible with external libraries.</p>
  
  <p>Thanks</p>