Add view classes

This commit is contained in:
Misode
2020-05-25 13:22:36 +02:00
parent 1bef36a713
commit 79a5742dad
9 changed files with 83 additions and 53 deletions

14
src/view/SourceView.ts Normal file
View File

@@ -0,0 +1,14 @@
import { DataModel } from "../model/DataModel"
import { Path } from "../model/Path"
export class SourceView {
model: DataModel
constructor(model: DataModel) {
this.model = model
}
render(target: HTMLElement) {
target.textContent = this.model.schema.transform(this.model.data)
}
}