diff --git a/src/accessibility/gridOutput.js b/src/accessibility/gridOutput.js index e0a62ddbef..5e91133c6a 100644 --- a/src/accessibility/gridOutput.js +++ b/src/accessibility/gridOutput.js @@ -10,6 +10,10 @@ import p5 from '../core/main'; //updates gridOutput p5.prototype._updateGridOutput = function(idT) { + // Check if the current rendering mode is WEBGL + if (this._renderer && this._renderer.isWEBGL) { + throw new Error('gridOutput() is not supported in WEBGL mode.'); + } //if html structure is not there yet if (!this.dummyDOM.querySelector(`#${idT}_summary`)) { return; diff --git a/src/accessibility/textOutput.js b/src/accessibility/textOutput.js index 5e37fd5781..09f030fc3d 100644 --- a/src/accessibility/textOutput.js +++ b/src/accessibility/textOutput.js @@ -10,6 +10,10 @@ import p5 from '../core/main'; //updates textOutput p5.prototype._updateTextOutput = function(idT) { + // Check if the current rendering mode is WEBGL + if (this._renderer.isWEBGL) { + throw new Error('textOutput() is not supported in WEBGL mode.'); + } //if html structure is not there yet if (!this.dummyDOM.querySelector(`#${idT}_summary`)) { return;