| 32 | //--------------------------------------------------------------------- |
| 33 | |
| 34 | class BrowserRuntimeClient extends RuntimeClient { |
| 35 | client: EveClient; |
| 36 | |
| 37 | constructor(client:EveClient) { |
| 38 | let dbs = { |
| 39 | "http": new HttpDatabase() |
| 40 | } |
| 41 | if(client.showIDE) { |
| 42 | dbs["view"] = new BrowserViewDatabase(); |
| 43 | dbs["editor"] = new BrowserEditorDatabase(); |
| 44 | dbs["inspector"] = new BrowserInspectorDatabase(); |
| 45 | } |
| 46 | super(dbs); |
| 47 | this.client = client; |
| 48 | } |
| 49 | |
| 50 | send(json) { |
| 51 | setTimeout(() => { |
| 52 | this.client.onMessage({data: json}); |
| 53 | }, 0); |
| 54 | } |
| 55 | |
| 56 | } |
| 57 | |
| 58 | export var responder: BrowserRuntimeClient; |
| 59 |
nothing calls this directly
no outgoing calls
no test coverage detected