Skip to content

Better error handling for WebGPU feature testing#42647

Merged
sideshowbarker merged 1 commit intomdn:mainfrom
jespertheend:patch-3
Jan 13, 2026
Merged

Better error handling for WebGPU feature testing#42647
sideshowbarker merged 1 commit intomdn:mainfrom
jespertheend:patch-3

Conversation

@jespertheend
Copy link
Contributor

Description

Added error handling for requestAdapter example call.

Motivation

See https://bugzilla.mozilla.org/show_bug.cgi?id=2008734
Firefox seems to throw during the navigator.gpu.requestAdapter() call when WebGPU is disabled by a blocklist, so I think it's better to be explicitly demonstrate this behaviour here. We used this snippet to feature test webgpu support and fallback to webgl if it wasn't supported, so this change in Firefox broke some of our sites.

Additional details

Related issues and pull requests

Added error handling for requestAdapter example call.
@jespertheend jespertheend requested a review from a team as a code owner January 6, 2026 15:33
@jespertheend jespertheend requested review from sideshowbarker and removed request for a team January 6, 2026 15:33
@github-actions github-actions bot added Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed labels Jan 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

Preview URLs

@sideshowbarker sideshowbarker merged commit d66e6bc into mdn:main Jan 13, 2026
6 checks passed
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.

2 participants

Comments