Initial commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import RoverApi from "./roverApi.js";
|
||||
|
||||
const api = new RoverApi();
|
||||
const body = document.getElementById("mainDivBody");
|
||||
|
||||
createBody();
|
||||
setInterval(checkNewData, 3 * 1000);
|
||||
|
||||
function checkNewData() {
|
||||
api.getRouteInfos(data => {
|
||||
body.innerText = JSON.stringify(data.infoObj, null, 2);
|
||||
});
|
||||
}
|
||||
|
||||
function createBody() {
|
||||
api.getRouteInfos(data => {
|
||||
body.innerHTML = JSON.stringify(data.infoObj, null, 2);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user