support for recorder (#361)

This commit is contained in:
Peli de Halleux 2017-03-01 14:24:59 -08:00 committed by GitHub
parent 2cd3bca8db
commit bd1f5a2b75

View File

@ -16,6 +16,9 @@ namespace pxsim {
neopixelState: NeoPixelState;
fileSystem: FileSystemState;
// visual
view: SVGElement;
constructor() {
super()
@ -123,10 +126,14 @@ namespace pxsim {
}), opts);
document.body.innerHTML = ""; // clear children
document.body.appendChild(viewHost.getView());
document.body.appendChild(this.view = viewHost.getView());
return Promise.resolve();
}
screenshot(): string {
return svg.toDataUri(new XMLSerializer().serializeToString(this.view));
}
}
export function initRuntimeWithDalBoard() {