Skip to content

Commit

Permalink
0.0.719
Browse files Browse the repository at this point in the history
  • Loading branch information
bahrus committed Dec 29, 2023
1 parent 56503bb commit d7eaf23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions tests/Example1a.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ const div = document.querySelector('div');
const model = {
greeting: 'hello'
};
const propagator = new EventTarget();
Transform(div, model, {
span: 'greeting',
}, propagator);
});
setTimeout(() => {
const span = document.createElement('span');
span.id = 'span';
div.appendChild(span);
}, 100);
setTimeout(() => {
model.greeting = 'bye';
propagator.dispatchEvent(new Event('greeting'));
}, 200);
4 changes: 1 addition & 3 deletions tests/Example1a.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@ const div = document.querySelector('div')!;
const model: Model = {
greeting: 'hello'
};
const propagator = new EventTarget();

Transform<Model>(div, model, {
span: 'greeting',
}, propagator);
});
setTimeout(() => {
const span = document.createElement('span');
span.id = 'span';
div.appendChild(span);
}, 100);
setTimeout(() => {
model.greeting = 'bye';
propagator.dispatchEvent(new Event('greeting'));
}, 200);

0 comments on commit d7eaf23

Please sign in to comment.