web
web copied to clipboard
Compatibility and nullability
We need to decide how to represent APIs that are not available on certain browsers:
- Does package:web only support the latest IDL regardless of the browser?
- Does package:web offer an alternative library that matches support known on the browsers currently supported by dart2js?
- Should JSNull/JSUndefined be exposed as Dart null automatically or be boxed?
Note this has implications in how easy it is to move code from dart:html
as well. dart:html
took the approach of using Dart's nullability and marking APIs as nullable if MDN indicated that it wasn't supported in all browsers that dart2js supports.