Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(WebGL API): enhance createShader(), compileShader(), and shaderS…
…ource() methods (#38008) * docs(WebGL API): enhance createShader(), compileShader(), and shaderSource() methods The WebGL documentation did not previously indicate the [`createShader()`](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/createShader) method may return `null` or that both [`compileShader()`](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/compileShader) and [`shaderSource()`](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/shaderSource) can throw `TypeError` exceptions. This commit improves clarity and accuracy, ensuring developers are better informed about potential failure cases. - Added amplifying information to the `type` parameter and details about possible `null` return value to [`createShader()`](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/createShader) method. - Added an Exceptions section for [`compileShader()`](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/compileShader) and [`shaderSource()`](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/shaderSource) methods to document potential `TypeError` exception. * Update files/en-us/web/api/webglrenderingcontext/createshader/index.md --------- Co-authored-by: wbamberg <[email protected]>
- Loading branch information