amatt13 / amatt13/BossFight

Create data binding for logged in player

Offen
#28 0 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @amatt13 Auf GitHub ansehen
Front End
Vorherrschende Sprache
C#
Sterne
1
Forks
1
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

```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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.