-
Notifications
You must be signed in to change notification settings - Fork 348
Work towards migrating devtools_app
to package:web
#6626
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
Changes from 3 commits
3079752
33e89b4
e6f3ea2
071fe25
ecbc973
1979f03
3041189
4fcf18e
8c531c3
a47ed6e
93f34da
b21367d
8d6b3a6
0ab80e3
920f303
9b40ccd
429af6f
a296596
46743af
36fea05
f896b98
e9bc026
fc71186
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,10 @@ | |
// found in the LICENSE file. | ||
|
||
import 'dart:async'; | ||
// ignore: avoid_web_libraries_in_flutter, as designed | ||
import 'dart:html' as html; | ||
import 'dart:ui_web' as ui_web; | ||
|
||
import 'package:flutter/foundation.dart'; | ||
import 'package:web/helpers.dart'; | ||
|
||
import '../../../../../shared/globals.dart'; | ||
import '../../../../../shared/primitives/trace_event.dart'; | ||
|
@@ -120,18 +119,18 @@ class PerfettoControllerImpl extends PerfettoController { | |
return _debugPerfettoUrl; | ||
} | ||
final basePath = assetUrlHelper( | ||
origin: html.window.location.origin, | ||
path: html.window.location.pathname ?? '', | ||
origin: window.location.origin, | ||
path: window.location.pathname, | ||
); | ||
final indexFilePath = ui_web.assetManager | ||
.getAssetUrl(devToolsExtensionPoints.perfettoIndexLocation); | ||
final baseUrl = '$basePath/$indexFilePath'; | ||
return '$baseUrl$_embeddedModeQuery'; | ||
} | ||
|
||
html.IFrameElement get perfettoIFrame => _perfettoIFrame; | ||
HTMLIFrameElement get perfettoIFrame => _perfettoIFrame; | ||
|
||
late final html.IFrameElement _perfettoIFrame; | ||
late final HTMLIFrameElement _perfettoIFrame; | ||
|
||
/// The set of trace events that should be shown in the Perfetto trace viewer. | ||
/// | ||
|
@@ -166,7 +165,7 @@ class PerfettoControllerImpl extends PerfettoController { | |
); | ||
_initialized = true; | ||
|
||
_perfettoIFrame = html.IFrameElement() | ||
_perfettoIFrame = createElementTag('iframe') as HTMLIFrameElement | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that this cast is okay in contrast with the cast above. You're casting between interop types and you know it's that type. I think this isn't a lint in the future with extension types. |
||
// This url is safe because we built it ourselves and it does not include | ||
// any user input. | ||
// ignore: unsafe_html | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.