4 ms·
> That is about to change however examples here https://youtu.be/yRlwOdCK7Ho https://youtu.be/yRlwOdCK7Ho 28:30 mark) But it doesn't explain what js.window IS.
by markdog12 3y ago
> That is about to change however examples here https://youtu.be/yRlwOdCK7Ho https://youtu.be/yRlwOdCK7Ho 28:30 mark)
But it doesn't explain what js.window IS. I assume it's implemented via static interop (https://pub.dev/packages/js#staticinterop https://pub.dev/packages/js#staticinterop), but not sure.
Is it out of some secret library they have somewhere, generated from Web IDL? Do I have to implement every function/property on window myself via static interop?
Btw, you can link to youtube with a timestamp: https://youtu.be/yRlwOdCK7Ho?t=1724 https://youtu.be/yRlwOdCK7Ho?t=1724
Update: I did find this package, which seems to generate bindings from Web IDL: https://pub.dev/packages/js_bindings https://pub.dev/packages/js_bindings, but it's not from the Dart team, and prob not what they're using here.
- mhoad 3y agoWork on that is happening here https://github.com/dart-lang/web https://github.com/dart-lang/web. I expect it will be fully baked by the time Dart 3.1 drops and in-line classes are a thing as it ends up making a big difference as far as I can tell.