google / node-gles

Apache License 2.0
323 stars 31 forks source link

Don't throw for unsupported extensions #57

Closed rnconrad closed 5 years ago

rnconrad commented 5 years ago

In WebGL, calls to getExtension return null if an extension isn't supported. The current throw behavior can cause issues for e.g. libraries that aren't expecting this to happen.

Spec: https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.14

This change no longer throws an error and instead returns null for unsupported extensions.


This change is Reviewable