mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-10 13:44:39 +08:00
This adds all missing imports for `ls` to all files. After this change, all usages of `ls` will now properly be resolved to a LocalizedString rather than a normal string. R=jacktfranklin@chromium.org No-Presubmit: True Change-Id: Icf6d8c3b8bea1f9e66f4b6b58e4ae4c7f99e6f9c Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2629554 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
28 lines
1019 B
JavaScript
28 lines
1019 B
JavaScript
// Copyright 2018 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
import * as Common from '../common/common.js';
|
|
import * as Components from '../components/components.js';
|
|
import * as Host from '../host/host.js';
|
|
import {ls} from '../platform/platform.js';
|
|
import * as SDK from '../sdk/sdk.js';
|
|
|
|
/**
|
|
* @implements {Common.Runnable.Runnable}
|
|
*/
|
|
export class JsMainImpl extends Common.ObjectWrapper.ObjectWrapper {
|
|
/**
|
|
* @override
|
|
*/
|
|
run() {
|
|
Host.userMetrics.actionTaken(Host.UserMetrics.Action.ConnectToNodeJSDirectly);
|
|
SDK.Connections.initMainConnection(() => {
|
|
const target = SDK.SDKModel.TargetManager.instance().createTarget('main', ls`Main`, SDK.SDKModel.Type.Node, null);
|
|
target.runtimeAgent().invoke_runIfWaitingForDebugger();
|
|
return Promise.resolve();
|
|
}, Components.TargetDetachedDialog.TargetDetachedDialog.webSocketConnectionLost);
|
|
return Promise.resolve();
|
|
}
|
|
}
|