web api instance method
WebGLRenderingContext: isProgram() method
Available in workers
The WebGLRenderingContext.isProgram() method of the WebGL API returns true if the
passed WebGLProgram is valid, false otherwise.
Syntax
isProgram(program)
Parameters
program- : A
WebGLProgramto check.
- : A
Return value
A GLboolean indicating whether or not the program is valid.
Examples
Checking a program
const canvas = document.getElementById("canvas");
const gl = canvas.getContext("webgl");
const program = gl.createProgram();
// …
gl.isProgram(program);
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.