PHP Classes

File: public_html/webdoors/klondike-solitaire/js/webdoor.js

Recommend this page to a friend!
  Packages of Matthew Asham   Binkterm PHP   public_html/webdoors/klondike-solitaire/js/webdoor.js   Download  
File: public_html/webdoors/klondike-solitaire/js/webdoor.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Binkterm PHP
Bulletin board system based on the Web
Author: By
Last change:
Date: 5 days ago
Size: 627 bytes
 

Contents

Class file image Download
class WebDoor { static async load() { const res = await fetch("/api/webdoor/session"); this.session = await res.json(); } static async save(state) { return fetch("/api/webdoor/save", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ state }) }); } static async loadSave() { const res = await fetch("/api/webdoor/load"); return res.ok ? (await res.json()).state : null; } static async deleteSave() { return fetch("/api/webdoor/delete", { method: "POST" }); } }