Files
react-native-devtools-frontend/front_end/components/Reload.js
T
Alex Rudenko ab16a956e5 Reattach the target before reloading
Some not yet resolved backend problem breaks the usual flow of events
after the anchor element navigation happens within the DevTools
(e.g., <a href="#anchor" />). One of the issues is that styles events
are missing after the DevTools's reloaded. This change reattaches the
target before reloading DevTools to mitigate the issue.

Fixed: 972001
Change-Id: Ie815a9a7e5dda8d39686068c8064e19bc31285b7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2157025
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2020-04-20 15:19:36 +00:00

15 lines
595 B
JavaScript

// Copyright 2015 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 Host from '../host/host.js';
import {State} from './DockController.js';
export function reload() {
if (self.Components.dockController.canDock() && self.Components.dockController.dockSide() === State.Undocked) {
Host.InspectorFrontendHost.InspectorFrontendHostInstance.setIsDocked(true, function() {});
}
Host.InspectorFrontendHost.InspectorFrontendHostInstance.reattach(() => window.location.reload());
}