Changes 'is' checks for JS types such that it no longer does an
instance of check and instead only checks to see if the object
in question is a JS object or appropriate subtype. This means that
any two @JS objects will pass an is check and therefore can be
casted as one another. This makes it consistent with expected
behavior and dart2js.
Also amends the README to reflect the unified behavior.
Change-Id: I11aa105d6cafbbafde482b27dcc1182c0960cce9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173140
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Use a 2.12.0 lower bound since pub does not understand allowed
experiments for earlier versions.
Use a 3.0.0 upper bound to avoid a warning in pub and to give some
flexibility in publishing for stable.
Change-Id: I482e89becc7aa9f1a36298701ade70cbcc39702c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170204
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
- bumps the meta version so it can be published
- updates sdk constraints to be consistent with all other packages (should have been equivalent anyways)
Change-Id: I83520d291625f13b0029e28aecb9714f365a75b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155460
Reviewed-by: William Hesse <whesse@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Make some improvements to bump up the pana score on the pub site.
- Make the package description a bit longer.
- Remove some unnecessary `new` and `const`.
Remove the reference to null safety. Drop the min SDK back to 2.0.0
After publish I will restore this. The SDK package config is unchanged
so this shouldn't impact whether tests can run with strong null safety.
Change-Id: I29d41914b1d9c4273fc6334d700be450d22616ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150468
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
We haven't published any of the recent changes to `package:js`, revert
back to the version just after the latest published.
Remove the changelog entry referring to `promiseToFuture`. This was a change in
the SDK libraries and is not associated with any single version of `package:js`.
Remove the author field from the pubspec, it is unused.
Expand the pubspec description.
Change-Id: Id2a37a7c947656a6f5ff4dd577d0e7d32e8e0b61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148188
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Remove sections describing differences between dart2js and ddc that
have since been resolved.
Both ddc and dart2js will require use of `allowInterop` in all but
unlikely edge cases. Both will be strict about argument types and count
as long as `allowInterop` is used.
Other fixes:
- Fix spelling of "supersedes".
- Use `List.from` over `list.cast().toList()` in example.
Change-Id: If4ce0926a4460ed41ddea2714ee3324c60770d62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136844
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
For now stage this in the package:js README - that might not be the best
place for it long term since the details may change...
- Add a note that makes it explicit we expect all interop to use
`package:js` instead of `dart:js`.
- Add notes about known limitations and differences between dart2js and
DDC.
Change-Id: Ib4c967ea1435dd85f41f56646140352b125cee4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107560
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
- Remove some unnecessary details in the README. The SDK constraint
duplicates the pubspec, the dependencies section duplicates automatic
info on the pub site, and the contributing section duplicates generate
Dart/SDK contributing information. The issue link is still useful
since it fills in a template, but we should update it to include a
label by default.
- Use "JavaScript" consistently in docs.
- Rephrase some doc comments for clarity.
- Drop `new` from examples.
- Use consistent single quotes in examples.
- Always show the `@JS()` annotation on `library` in examples.
- Move the note about factory constructors for anonymous classes to the
annotation from the README.
- Bump the mimimum SDK to`2.0.0` since there isn't utility in claiming
support for older SDKs.
There are stale docs remaining in the `varargs.dart` library that should
be handled separately by deleting that library.
Change-Id: Ida51d2ec3fd31210b55dc91042a0ac1cf77210b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107450
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>