MattNet / VBSF

The 'Victory by Star Fleet' campaign game. A 'Victory by any means' campaign game using the Star Fleet Battles background
GNU General Public License v3.0
1 stars 0 forks source link

Refresh of the sheet does not always show the data #1

Closed MattNet closed 1 year ago

MattNet commented 2 years ago

The player sheet (/sheet/index.html) does not always load the data file (from /files/) in time to parse it with the map code (/sheet/maps.js) and the page-building code (/sheet/indexBuild.js)

MattNet commented 1 year ago

A possible solution is to refactor the client-side code for a framework or library that can serialize script requests before loading the rest of the document. Possible code is JQuery or KnockoutJS

MattNet commented 1 year ago

Another solution is to wrap the indexBuild.js and maps.js code in functions that fire after the DOMContentLoaded event

MattNet commented 1 year ago

Wrapped the indexBuild.js and map.js code in functions that are called when the document is loaded