njx/brackets-livedev2 — pull request #10 by sebaslv (2014-07-07 13:05:16+00:00)
Title: Move connections and script injection to protocol

Move connection management from ```LiveDocument``` to ```LiveDevProtocol```. It avoids propagating connections across multiple document instances and make remote calls without having to explicitly provide the active connections. ```clients``` is now an optional parameter to invoke remote calls. If it
isn't present, messages are broadcast to all active clients.
```Connection.[connect|close]``` events are triggered for each new and closed connection respectively and handled now at ```LiveDevelopment``` for workflow management purposes.

Script injection was moved from connection handler at ```LiveDocument.onConnect``` to
```getRemoteScripts``` at ```LiveDevProtocol```. It allows better control of all injected scripts at the same point and make them to be executed in sequence during page loading process. Injection of scripts via evaluate could be provided by a protocol method and used for dynamically adding 'extra livedev features'?