Skip to content

Commit 57353c1

Browse files
authored
Fix globalContext rename (#68)
* also bump min SDK * Ignore lint
1 parent 2a15170 commit 57353c1

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.1.5-wip
2+
3+
- Require Dart 3.2 pre-release.
4+
15
## 0.1.4-beta
26

37
- Support `bool`, `int`, `double`, `String` in APIs.

lib/helpers.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Element? querySelector(String selectors) => document.querySelector(selectors);
5353

5454
bool isInstanceOfDomType(JSObject? o, String domType) {
5555
if (o == null) return false;
56-
final constructor = globalJSObject[domType.toJS];
56+
final constructor = globalContext.getProperty(domType.toJS);
5757
if (constructor == null) return false;
5858
return o.instanceof(constructor as JSFunction).toDart;
5959
}

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: web
22
description: >-
33
Lightweight DOM and JS bindings built around JS static interop.
4-
version: 0.1.4-beta
4+
version: 0.1.5-wip
55

66
repository: https://github.com/dart-lang/web
77

88
environment:
9-
sdk: ">=3.1.0-185.0.dev <4.0.0"
9+
sdk: ">=3.2.0-75.0.dev <4.0.0"
1010

1111
dev_dependencies:
1212
args: ^2.4.0

tool/bindings_generator/util.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ extension JSArrayExtension on JSArray {
1818
extension JSStringHelpers on JSString? {
1919
// TODO(joshualitt): Clean this up after updating JS types.
2020
// String? get toDartString => this.isUndefinedOrNull ? null : this!.toDart;
21+
// ignore: prefer_null_aware_operators
2122
String? get toDartString => this == null ? null : this!.toDart;
2223
}
2324

0 commit comments

Comments
 (0)