Polymer elements support bind, creation of new elements, overwrite with simple object, events

This commit is contained in:
DadaMonad
2014-12-26 13:36:45 +00:00
parent fd1128d456
commit 6790355232
84 changed files with 249 additions and 31221 deletions

View File

@@ -14,7 +14,10 @@ class Connector
@receive_handlers = []
# A list of functions that are executed (left to right) when syncing with a peer.
@sync_process_order = []
getUniqueConnectionId: ->
@id # make sure, that every connector implementation does it like this
#
# Execute a function _when_ we are connected. If not connected, wait until connected.
# @param f {Function} Will be executed on the PeerJs-Connector context.

View File

@@ -5,7 +5,7 @@ new Polymer 'peerjs-connector',
if this.is_initialized
throw new Error "You must not set the user_id twice!"
else
this.initializeConnection()
this.initializeConnection()
initializeConnection: ()->
if this.conn_id?
@@ -22,8 +22,7 @@ new Polymer 'peerjs-connector',
writeIfAvailable 'debug', this.debug
this.is_initialized = true;
this.connector = new PeerJsConnector this.conn_id, options
ready: ()->
if this.conn_id != null
this.initializeConnection()