Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/accessibility/gridOutput.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now we don't have this property on renderers (although #5844 is open for it, it hasn't yet been merged.) For now I think maybe you can check if this._renderer instanceof p5.RendererGL to achieve the same thing.

throw new Error('gridOutput() is not supported in WEBGL mode.');
}
//if html structure is not there yet
if (!this.dummyDOM.querySelector(`#${idT}_summary`)) {
return;
Expand Down
4 changes: 4 additions & 0 deletions src/accessibility/textOutput.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down