Added a basic DOM diff algorithm
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { Application } from "./Application"
|
||||
import { Diff } from "./Diff"
|
||||
import { findAll } from "./utils"
|
||||
import * as actions from "./actions"
|
||||
|
||||
@ -23,6 +24,14 @@ export class AnimeNotifier {
|
||||
this.app.run()
|
||||
}
|
||||
|
||||
reloadContent() {
|
||||
return fetch("/_" + this.app.currentPath, {
|
||||
credentials: "same-origin"
|
||||
})
|
||||
.then(response => response.text())
|
||||
.then(html => Diff.innerHTML(this.app.content, html))
|
||||
}
|
||||
|
||||
loading(isLoading: boolean) {
|
||||
if(isLoading) {
|
||||
this.app.loading.classList.remove(this.app.fadeOutClass)
|
||||
|
Reference in New Issue
Block a user