You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just realized that the change in the IDL is rather recent. It was introduced a few months ago with version 3.52.1 (package:web is on 3.49.0 if the readme is correct) but they weren't nullable in dart:web_gl and that's why I was surprised.
EDIT: looking at the spec, it was changed to nullable in 2014, and now in July 2024 back to not nullable
Yup, looks like this is a matter of updating the Web IDL version we use. I believe there are other breaking changes that would get pulled in with this, so we may wait a little while before we release a 2.0.0 in case we want to get other breaking changes in at the same time (and also remove some deprecations!).
dart:web_gl and the other dart: web libraries were based on stale Chrome IDL files that were last synced ~2017. Looking at the definitions in third_party/WebCore in the Dart SDK, createBuffer was non-nullable then.
For example
createBuffer()
:web/web/lib/src/dom/webgl1.dart
Line 1098 in 8478cd2
vs IDL
https://github.com/w3c/webref/blob/15065116311262f763dc57d5bd0b2f1f5356fc20/ed/idl/webgl1.idl#L564
and specification: https://registry.khronos.org/webgl/specs/latest/1.0/#5.14.5
Only
createShader()
should return a nullable object.The text was updated successfully, but these errors were encountered: