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

dart:html APIs unsupported on some browser should be nullable #41905

Closed
sigmundch opened this issue May 15, 2020 · 4 comments
Closed

dart:html APIs unsupported on some browser should be nullable #41905

sigmundch opened this issue May 15, 2020 · 4 comments
Assignees
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. library-html NNBD Issues related to NNBD Release P1 A high priority bug; for example, a single project is unusable or has many test failures web-libraries Issues impacting dart:html, etc., libraries

Comments

@sigmundch
Copy link
Member

In debugging some internal apps I've come across several APIs that are not supported in FF and Safari. These are currently marked as non-nullable because they aren't nullable in Chrome, but in those browsers they are.

So far I've run into:

Short term we need to mark all those APIs as nullable. We should however discuss whether we should change our default (being more lax about nullability, or cross referencing them with some other database).

@sigmundch sigmundch added P1 A high priority bug; for example, a single project is unusable or has many test failures web-libraries Issues impacting dart:html, etc., libraries area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. labels May 15, 2020
@sigmundch
Copy link
Member Author

@srujzs could you take a look at making those APIs nullable for now?

We should meet to discuss the possibility of being more conservative at first (sprinkle more nullable APIs for now) or to validate with something like the dom d.ts or a way to load the MDN in an automated fashion.

/cc @rakudrama

@sigmundch
Copy link
Member Author

@vsmenon @jacob314 - are you aware of a location where the MDN information can be downloaded in a machine format that we can use as input for this?

For what it's worth, none of the APIs above that have issues appear in the typescript d.ts file: https://github.com/microsoft/TypeScript/blob/master/src/lib/dom.generated.d.ts

@sigmundch
Copy link
Member Author

Another one: HtmlElement.nonce and NonceElement.nonce getters

dart-bot pushed a commit that referenced this issue May 16, 2020
Bug: #41905

Addresses browser incompatibilities for attributes that are
blocking dart2js tests.

Change-Id: I2c7af57e236ba6122cce4c0e98efc04d5e11b525
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148320
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
dart-bot pushed a commit that referenced this issue May 27, 2020
#41905

This repo is added for code generation for dart:html. There are
various instances of APIs being unsupported for some browsers,
and this repo provides metadata on which ones are unsupported.

Change-Id: I6740c022cec46352017c38f7c298581695ad33e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149051
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
@srujzs srujzs self-assigned this Jun 3, 2020
@sigmundch sigmundch added this to tech preview 2 in Dart web null safety Jun 23, 2020
@sigmundch sigmundch moved this from tech preview 2 to in progress (for tech preview 2) in Dart web null safety Jun 23, 2020
@sigmundch sigmundch added the NNBD Issues related to NNBD Release label Jun 30, 2020
dart-bot pushed a commit that referenced this issue Jul 1, 2020
Bug: #41905

Uses MDN information in the generator script to get a better idea
of which attributes are compatible and are not. mdnreader.py is
introduced to parse the data present in third_party.

Change-Id: I330ccf918cb42deb4c09ab97db5f3d2f0c432d99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149800
Reviewed-by: Stephen Adams <sra@google.com>
srujzs added a commit to srujzs/engine that referenced this issue Jul 7, 2020
Changes introduced in dart-lang/sdk#41905
require compatible changes in flutter engine. This CL adds
null-asserts wherever necessary to maintain behavior.
srujzs added a commit to srujzs/engine that referenced this issue Jul 9, 2020
Changes related to compatibility info require changes in
Flutter engine libraries. This CL adds null-asserts wherever
necessary to maintain behavior and adds some small modifications
to handle the change in nullability. Warnings about unnecessary
null assertions are disabled temporarily in this CL as well.

Original issue: dart-lang/sdk#41905
srujzs added a commit to srujzs/engine that referenced this issue Jul 9, 2020
Changes introduced in dart-lang/sdk#41905
require compatible changes in flutter engine. This CL adds
null-asserts wherever necessary to maintain behavior.
srujzs added a commit to srujzs/engine that referenced this issue Jul 9, 2020
Changes related to compatibility info require changes in
Flutter engine libraries. This CL adds null-asserts wherever
necessary to maintain behavior and adds some small modifications
to handle the change in nullability. Warnings about unnecessary
null assertions are disabled temporarily in this CL as well.

Original issue: dart-lang/sdk#41905
srujzs added a commit to srujzs/engine that referenced this issue Jul 10, 2020
Changes related to compatibility info require changes in
Flutter engine libraries. This CL adds null-asserts wherever
necessary to maintain behavior and adds some small modifications
to handle the change in nullability. Warnings about unnecessary
null assertions are disabled temporarily in this CL as well.

Original issue: dart-lang/sdk#41905
yjbanov pushed a commit to flutter/engine that referenced this issue Jul 10, 2020
Changes related to compatibility info require changes in
Flutter engine libraries. This CL adds null-asserts wherever
necessary to maintain behavior and adds some small modifications
to handle the change in nullability. Warnings about unnecessary
null assertions are disabled temporarily in this CL as well.

Original issue: dart-lang/sdk#41905
@srujzs
Copy link
Contributor

srujzs commented Jul 15, 2020

Dart changes have been merged. Closing.

@srujzs srujzs closed this as completed Jul 15, 2020
Dart web null safety automation moved this from in progress (for tech preview 2) to done Jul 15, 2020
srujzs added a commit to srujzs/engine that referenced this issue Jul 17, 2020
Since dart-lang/sdk#41905 has closed,
this CL removes the suppression of unnecessary_non_null_assertion
and unnecessary_null_comparison. It also removes an unnecessary
null assertion that was not being reported.
srujzs added a commit to srujzs/engine that referenced this issue Jul 17, 2020
Since dart-lang/sdk#41905 has closed,
this CL removes the suppression of unnecessary_non_null_assertion
and unnecessary_null_comparison. It also removes an unnecessary
null assertion that was not being reported.
srujzs added a commit to srujzs/engine that referenced this issue Jul 17, 2020
Since dart-lang/sdk#41905 has closed,
this CL removes the suppression of unnecessary_non_null_assertion
and unnecessary_null_comparison. It also removes few unnecessary
null assertions that was not being reported.
cbracken added a commit to cbracken/flutter_engine that referenced this issue Sep 14, 2020
Since dart-lang/sdk#41905 has closed, this CL removes the suppression of
unnecessary_non_null_assertion and unnecessary_null_comparison.

Related issues: dart-lang/sdk#41905 (resolved)
cbracken added a commit to cbracken/flutter_engine that referenced this issue Sep 14, 2020
Since dart-lang/sdk#41905 has closed, this CL removes the suppression of
unnecessary_non_null_assertion and unnecessary_null_comparison.

Related issues: dart-lang/sdk#41905 (resolved)
cbracken added a commit to cbracken/flutter_engine that referenced this issue Sep 14, 2020
Since dart-lang/sdk#41905 has closed, this CL removes the suppression of
unnecessary_non_null_assertion and unnecessary_null_comparison.

Related issues: dart-lang/sdk#41905 (resolved)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. library-html NNBD Issues related to NNBD Release P1 A high priority bug; for example, a single project is unusable or has many test failures web-libraries Issues impacting dart:html, etc., libraries
Projects
Development

Successfully merging a pull request may close this issue.

2 participants