Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(WebGL API): enhance createShader(), compileShader(), and shaderSource() methods #38008

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jobansd
Copy link

@jobansd jobansd commented Feb 6, 2025

Description

The WebGL documentation did not previously indicate the createShader() method may return null or that both compileShader() and shaderSource() can throw TypeError exceptions.

Motivation

This commit improves clarity and accuracy, ensuring developers are better informed about potential failure cases.

Additional details

Changes

  • Added amplifying information to the type parameter and details about possible null return value to createShader() method.
  • Added an Exceptions section for compileShader() and shaderSource() methods to document potential TypeError exception.

Related issues and pull requests

n/a

…ource() 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.
@jobansd jobansd requested a review from a team as a code owner February 6, 2025 23:18
@jobansd jobansd requested review from wbamberg and removed request for a team February 6, 2025 23:18
@github-actions github-actions bot added Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed labels Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant