INNER CODE UNIT · JavaScript
loadData
Booodaness/Scientific-Notes · Booodaness/_Assets/Presentations/phase-space-analysis-harmonic-oscillators.md/plugin/chalkboard/plugin (copy).js:402
function loadData( filename ) {
var xhr = new XMLHttpRequest();
xhr.onload = function() {
if (xhr.readyState === 4 && xhr.status != 404 ) {
loaded = initStorage(xhr.responseText);
console.log("Drawings loaded from file");
}
else {
config.readOnly = undefined;
readOnly = undefined;
console.warn( 'Failed to get file ' + filename +". ReadyState: " + xhr.readyState + ", Status: " + xhr.status);
loaded = false;
}
};
xhr.open( 'GET', filename, true );
try {
xhr.send();