UWP: Add console input

This commit is contained in:
Paul Rouget 2020-06-19 08:04:18 +02:00
parent 9de955f2cc
commit c722b5fdca
5 changed files with 89 additions and 29 deletions

View file

@ -335,6 +335,15 @@ void BrowserPage::OnDevtoolsButtonClicked(IInspectable const &,
}
}
void BrowserPage::OnJSInputEdited(IInspectable const &,
Input::KeyRoutedEventArgs const &e) {
if (e.Key() == Windows::System::VirtualKey::Enter) {
auto input = JSInput().Text();
JSInput().Text(L"");
mDevtoolsClient->Evaluate(input);
}
}
void BrowserPage::OnURLEdited(IInspectable const &,
Input::KeyRoutedEventArgs const &e) {
if (e.Key() == Windows::System::VirtualKey::Enter) {