Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/react-devtools-core/src/standalone.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ function initialize(socket: WebSocket) {

store = new Store(bridge, {
checkBridgeProtocolCompatibility: true,
supportsNativeInspection: false,
supportsNativeInspection: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One other place the standalone is used in Safari. Could you test there as well to make sure inspection works there as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested on a react app on Safari, inspection works!

});

log('Connected');
Expand Down
6 changes: 6 additions & 0 deletions packages/react-devtools-shared/src/backend/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ type PersistedSelection = {|
export default class Agent extends EventEmitter<{|
hideNativeHighlight: [],
showNativeHighlight: [NativeType],
startInspectingNative: [],
stopInspectingNative: [],
shutdown: [],
traceUpdates: [Set<NativeType>],
|}> {
Expand Down Expand Up @@ -655,6 +657,10 @@ export default class Agent extends EventEmitter<{|
this._bridge.send('profilingStatus', this._isProfiling);
};

stopInspectingNative = (selected: boolean) => {
this._bridge.send('stopInspectingNative', selected);
};

storeAsGlobal = ({count, id, path, rendererID}: StoreAsGlobalParams) => {
const renderer = this._rendererInterfaces[rendererID];
if (renderer == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ export default function setupHighlighter(
window.addEventListener('pointerdown', onPointerDown, true);
window.addEventListener('pointerover', onPointerOver, true);
window.addEventListener('pointerup', onPointerUp, true);
} else {
agent.emit('startInspectingNative');
}
}

Expand All @@ -74,6 +76,8 @@ export default function setupHighlighter(
window.removeEventListener('pointerdown', onPointerDown, true);
window.removeEventListener('pointerover', onPointerOver, true);
window.removeEventListener('pointerup', onPointerUp, true);
} else {
agent.emit('stopInspectingNative');
}
}

Expand Down