File tree Expand file tree Collapse file tree 6 files changed +19
-15
lines changed Expand file tree Collapse file tree 6 files changed +19
-15
lines changed Original file line number Diff line number Diff line change 27
27
- uses : dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
28
28
with :
29
29
sdk : ${{ matrix.sdk }}
30
+ flavor : ${{ matrix.flavor }}
30
31
- id : install
31
32
name : Install dependencies
32
33
run : dart pub get
37
38
run : dart analyze --fatal-infos
38
39
if : always() && steps.install.outcome == 'success'
39
40
40
- # Run tests on a matrix consisting of two dimensions:
41
+ # Run tests on a matrix consisting of three dimensions:
41
42
# 1. OS: ubuntu-latest, (macos-latest, windows-latest)
42
- # 2. release channel: dev
43
+ # 2. release channel: main, dev
44
+ # 3. flavor: raw
43
45
test :
44
46
needs : analyze
45
47
runs-on : ${{ matrix.os }}
55
57
- uses : dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
56
58
with :
57
59
sdk : ${{ matrix.sdk }}
60
+ flavor : ${{ matrix.flavor }}
58
61
- id : install
59
62
name : Install dependencies
60
63
run : dart pub get
Original file line number Diff line number Diff line change
1
+ ## 0.2.2-beta
2
+
3
+ - Updates SDK version minimum to 3.2.0-194.0.dev.
4
+ - Removes ` isInstanceOfDomType ` as ` dart:js_interop ` now exposes
5
+ ` instanceOfString ` .
6
+
1
7
## 0.2.1-beta
2
8
3
9
- ` helpers.dart `
Original file line number Diff line number Diff line change @@ -51,10 +51,3 @@ external JSFunction get _audioConstructor;
51
51
HTMLAudioElement createAudioElement () => _audioConstructor.callAsConstructor ();
52
52
53
53
Element ? querySelector (String selectors) => document.querySelector (selectors);
54
-
55
- bool isInstanceOfDomType (JSObject ? o, String domType) {
56
- if (o == null ) return false ;
57
- final constructor = globalContext[domType];
58
- if (constructor == null ) return false ;
59
- return o.instanceof (constructor as JSFunction ).toDart;
60
- }
Original file line number Diff line number Diff line change @@ -612,7 +612,7 @@ String _determineTransitionEventType(EventTarget e) {
612
612
}
613
613
614
614
String _determineVisibilityChangeEventType (EventTarget e) {
615
- if (e.typeofEquals ('undefined' .toJS).toDart ) {
615
+ if (e.typeofEquals ('undefined' ) ) {
616
616
return 'visibilitychange' ;
617
617
} else if (e.hasProperty ('mozHidden' .toJS).toDart) {
618
618
return 'mozvisibilitychange' ;
Original file line number Diff line number Diff line change 1
1
name : web
2
2
description : >-
3
3
Lightweight DOM and JS bindings built around JS static interop.
4
- version : 0.2.1 -beta
4
+ version : 0.2.2 -beta
5
5
6
6
repository : https://github.com/dart-lang/web
7
7
8
8
environment :
9
- sdk : " >=3.2.0-157 .0.dev <4.0.0"
9
+ sdk : " >=3.2.0-194 .0.dev <4.0.0"
10
10
11
11
dev_dependencies :
12
12
args : ^2.4.0
Original file line number Diff line number Diff line change 5
5
@TestOn ('browser' )
6
6
library ;
7
7
8
+ import 'dart:js_interop' ;
9
+
8
10
import 'package:test/test.dart' ;
9
11
import 'package:web/helpers.dart' ;
10
12
11
13
void main () {
12
- test ('isInstanceOfDomType ' , () {
14
+ test ('instanceOfString works with package:web types ' , () {
13
15
final div = document.createElement ('div' );
14
16
15
- expect (isInstanceOfDomType ( div, 'bob' ), false );
16
- expect (isInstanceOfDomType ( div, 'HTMLDivElement' ), true );
17
+ expect (div. instanceOfString ( 'bob' ), false );
18
+ expect (div. instanceOfString ( 'HTMLDivElement' ), true );
17
19
});
18
20
}
You can’t perform that action at this time.
0 commit comments