diff options
| author | ab <abdullah_ahmed@brown.edu> | 2019-07-23 11:38:10 -0400 |
|---|---|---|
| committer | ab <abdullah_ahmed@brown.edu> | 2019-07-23 11:38:10 -0400 |
| commit | 13c016d7f7765acda7f6ce2d69c14597469f55d7 (patch) | |
| tree | 6fcf409ee4f0035443aa4fb67a05d24aae09689d /src/debug | |
| parent | bd841fe56540e1a9177d2872310b10fefcb4acd1 (diff) | |
| parent | d880e4b2fcb4e7bab3ee25d63209b173efcf37c0 (diff) | |
merged
Diffstat (limited to 'src/debug')
| -rw-r--r-- | src/debug/Repl.tsx | 6 | ||||
| -rw-r--r-- | src/debug/Viewer.tsx | 15 |
2 files changed, 14 insertions, 7 deletions
diff --git a/src/debug/Repl.tsx b/src/debug/Repl.tsx index 91b711c79..4f4db13d2 100644 --- a/src/debug/Repl.tsx +++ b/src/debug/Repl.tsx @@ -6,6 +6,7 @@ import { CompileScript } from '../client/util/Scripting'; import { makeInterface } from '../new_fields/Schema'; import { ObjectField } from '../new_fields/ObjectField'; import { RefField } from '../new_fields/RefField'; +import { DocServer } from '../client/DocServer'; @observer class Repl extends React.Component { @@ -63,4 +64,7 @@ class Repl extends React.Component { } } -ReactDOM.render(<Repl />, document.getElementById("root"));
\ No newline at end of file +(async function () { + DocServer.init(window.location.protocol, window.location.hostname, 4321, "repl"); + ReactDOM.render(<Repl />, document.getElementById("root")); +})();
\ No newline at end of file diff --git a/src/debug/Viewer.tsx b/src/debug/Viewer.tsx index c085b3483..24db3f934 100644 --- a/src/debug/Viewer.tsx +++ b/src/debug/Viewer.tsx @@ -181,9 +181,12 @@ class Viewer extends React.Component { } } -ReactDOM.render(( - <div style={{ position: "absolute", width: "100%", height: "100%" }}> - <Viewer /> - </div>), - document.getElementById('root') -);
\ No newline at end of file +(async function () { + await DocServer.init(window.location.protocol, window.location.hostname, 4321, "viewer"); + ReactDOM.render(( + <div style={{ position: "absolute", width: "100%", height: "100%" }}> + <Viewer /> + </div>), + document.getElementById('root') + ); +})();
\ No newline at end of file |
