File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
packages/playground/windows/playground Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,9 @@ void MainPage::OnLoadClick(
5454 host.InstanceSettings ().DebuggerBreakOnNextLine (x_BreakOnFirstLineCheckBox ().IsChecked ().GetBoolean ());
5555 host.InstanceSettings ().UseFastRefresh (x_UseFastRefreshCheckBox ().IsChecked ().GetBoolean ());
5656 host.InstanceSettings ().DebuggerPort (static_cast <uint16_t >(std::stoi (std::wstring (x_DebuggerPort ().Text ()))));
57+ if (!m_bundlerHostname.empty ()) {
58+ host.InstanceSettings ().DebugHost (m_bundlerHostname);
59+ }
5760
5861 // Nudge the ReactNativeHost to create the instance and wrapping context
5962 host.ReloadInstance ();
@@ -73,6 +76,10 @@ void winrt::playground::implementation::MainPage::x_entryPointCombo_SelectionCha
7376 }
7477}
7578
79+ void MainPage::OnNavigatedTo (xaml::Navigation::NavigationEventArgs const &e) {
80+ m_bundlerHostname = unbox_value<hstring>(e.Parameter ());
81+ }
82+
7683Microsoft::ReactNative::ReactNativeHost MainPage::Host () noexcept {
7784 return Application::Current ().as <App>()->Host ();
7885}
Original file line number Diff line number Diff line change @@ -16,12 +16,13 @@ struct MainPage : MainPageT<MainPage> {
1616 Microsoft::ReactNative::ReactInstanceSettings m_instanceSettings;
1717 Windows::Foundation::Collections::IVector<Microsoft::ReactNative::IReactPackageProvider> m_packageProviders;
1818
19- bool m_useWebDebugger{ false } ;
19+ winrt::hstring m_bundlerHostname ;
2020
2121 public:
2222 void x_entryPointCombo_SelectionChanged (
2323 winrt::Windows::Foundation::IInspectable const &sender,
2424 xaml::Controls::SelectionChangedEventArgs const &e);
25+ void OnNavigatedTo (xaml::Navigation::NavigationEventArgs const &e);
2526};
2627
2728} // namespace winrt::playground::implementation
Original file line number Diff line number Diff line change 4545
4646 <Capabilities >
4747 <Capability Name =" internetClient" />
48+ <Capability Name =" privateNetworkClientServer" />
4849 </Capabilities >
4950</Package >
You can’t perform that action at this time.
0 commit comments