Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0f1308a

Browse files
committed
Remove Observer as a separate class
1 parent 1333177 commit 0f1308a

File tree

3 files changed

+2
-20
lines changed

3 files changed

+2
-20
lines changed

homework-classes/Observer.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

homework-classes/View.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
'use strict';
22

33
{
4-
const { Observer } = window;
5-
6-
class View extends Observer {
4+
class View {
75
constructor(model, account) {
8-
super(model);
6+
model.subscribe(this);
97
this.model = model;
108
this.header = null;
119
this.select = null;

homework-classes/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
<body>
2323
<div id="root"></div>
2424
<script src="./Observable.js"></script>
25-
<script src="./Observer.js"></script>
2625
<script src="./Model.js"></script>
2726
<script src="./View.js"></script>
2827
<script src="./App.js"></script>

0 commit comments

Comments
 (0)