diff --git a/packages/jspsych/src/modules/plugin-api/HardwareAPI.ts b/packages/jspsych/src/modules/plugin-api/HardwareAPI.ts index ed4b1726..3929c83d 100644 --- a/packages/jspsych/src/modules/plugin-api/HardwareAPI.ts +++ b/packages/jspsych/src/modules/plugin-api/HardwareAPI.ts @@ -9,7 +9,7 @@ export class HardwareAPI { //it might be useful to open up a line of communication from the extension back to this page //script, again, this will have to pass through DOM events. For now speed is of no concern so I //will use jQuery - document.addEventListener("jspsych-activate", function (evt) { + document.addEventListener("jspsych-activate", (evt) => { this.hardwareConnected = true; }); } diff --git a/packages/jspsych/src/modules/plugin-api/MediaAPI.ts b/packages/jspsych/src/modules/plugin-api/MediaAPI.ts index 9eb83d3e..47310bff 100644 --- a/packages/jspsych/src/modules/plugin-api/MediaAPI.ts +++ b/packages/jspsych/src/modules/plugin-api/MediaAPI.ts @@ -27,7 +27,7 @@ export class MediaAPI { } getAudioBuffer(audioID) { - return new Promise(function (resolve, reject) { + return new Promise((resolve, reject) => { // check whether audio file already preloaded if ( typeof this.audio_buffers[audioID] == "undefined" ||