mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-25 08:06:51 +00:00
Add view classes
This commit is contained in:
14
src/view/SourceView.ts
Normal file
14
src/view/SourceView.ts
Normal 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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user