amatt13 / amatt13/BossFight

Create data binding for logged in player

Open
#28 0 comments 0 reactions 1 assignee Claimed by @amatt13 View on GitHub
Front End
Dominant language
C#
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Description

```js
const dataProxy = new Proxy(data, {
set(target, property, value) {
target[property] = value;
const input = document.getElementById(property);
if (input) {
input.value = value;
}
return true;
}
});
```

We should use this object whenever we want to change something on the player.
We will need to update the elements' id fields to be consistent in their naming for this to work.
This will also require that the elements have a "oninput" event that triggers an corresponding update function which will update the underlying object.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.