From 9800edebb5f7c03e3f8dd46b95717e0da6b90bd5 Mon Sep 17 00:00:00 2001 From: Glenwing Date: Sun, 18 Mar 2018 01:06:42 -0700 Subject: [PATCH] CTA Test 5 --- bandwidth/bandwidth.js | 19 ++++--------------- bandwidth/index.html | 2 +- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/bandwidth/bandwidth.js b/bandwidth/bandwidth.js index 3c64cd3..0e62030 100644 --- a/bandwidth/bandwidth.js +++ b/bandwidth/bandwidth.js @@ -1058,22 +1058,11 @@ function SI_set_precision(SI_options, prefixDef, pre2num) { } -function Load_CTA_861() { +async function Load_CTA_861() { // Loads the timing definitions for the CTA-861 standard from a csv file - fetch('CTA861.txt') - .then( - function(response, data) { - if (response.status !== 200 && response.status !== 0) { - console.log('Response code:', response.status); - return; - } - CTA861 = data; - } - ).then( - function() { - DEBUG(CTA861); - } - ) + response = await fetch('CTA861.txt'); + CTA861 = await response.text(); + DEBUG(await response.text()); } diff --git a/bandwidth/index.html b/bandwidth/index.html index 90c2f4a..776f3f9 100644 --- a/bandwidth/index.html +++ b/bandwidth/index.html @@ -31,7 +31,7 @@