Skip to content

Commit b577bdf

Browse files
authored
Open devtools in a new window (#317)
1 parent 5f389be commit b577bdf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

webdev/lib/src/serve/handlers/dev_handler.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ class DevHandler {
150150
.serialize(DevToolsResponse((b) => b..success = true))));
151151

152152
appServices.connectedInstanceId = message.instanceId;
153-
await appServices.chrome.chromeConnection
154-
// Chrome protocol for spawning a new tab.
155-
.getUrl('json/new/?http://${_devTools.hostname}:${_devTools.port}'
156-
'/?uri=${appServices.debugService.wsUri}');
153+
await appServices.debugService.chromeProxyService.tabConnection.runtime
154+
.evaluate(
155+
'window.open("http://${_devTools.hostname}:${_devTools.port}'
156+
'/?uri=${appServices.debugService.wsUri}", "", "_blank")');
157157
} else if (message is ConnectRequest) {
158158
if (appId != null) {
159159
throw StateError('Duplicate connection request from the same app. '

0 commit comments

Comments
 (0)