import { element } from "./element.js"; import { submission } from "./submission.js"; class parser { #source_url; #database; constructor(source_url) { if (typeof(source_url) !== "string") { throw "Source URL must be an string."; } this.#source = source; this.#database = undefined; } async load() { const result = await fetch(this.#source); if (!result.ok) { throw "Can not load database from server."; } if (result.status !== 200) { throw "Can not load database from server. Result not 200."; } const database = await result.json(); this.#fetch_result(database); } #fetch_result(database) { } } export { parser };