(self)
| 200 | return not (self._ext_close or self.comm._closed) |
| 201 | |
| 202 | def on_close(self): |
| 203 | # When the socket is closed, deregister the websocket with |
| 204 | # the FigureManager. |
| 205 | if self.is_open(): |
| 206 | try: |
| 207 | self.comm.close() |
| 208 | except KeyError: |
| 209 | # apparently already cleaned it up? |
| 210 | pass |
| 211 | |
| 212 | def send_json(self, content): |
| 213 | self.comm.send({'data': json.dumps(content)}) |
no test coverage detected