A website for my game dev stuff that supports chat, etc.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
class GetJson {
|
|
constructor(url) {
|
|
this.url = url;
|
|
this.items = [];
|
|
}
|
|
|
|
async theData() {
|
|
const resp = await fetch(this.url);
|
|
console.assert(resp.status == 200, "failed to get it");
|
|
this.items = await resp.json();
|
|
return this.items;
|
|
}
|
|
}
|
|
|
|
|