mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
Ladybird: Basic support for window.alert() and window.confirm()
This commit is contained in:
parent
aa5f886128
commit
f2b126f4d7
Notes:
sideshowbarker
2024-07-17 02:47:56 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/f2b126f4d7 Pull-request: https://github.com/SerenityOS/serenity/pull/16583 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/linusg
1 changed files with 7 additions and 3 deletions
|
@ -289,13 +289,17 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
virtual void page_did_request_alert(String const&) override
|
||||
virtual void page_did_request_alert(String const& message) override
|
||||
{
|
||||
QMessageBox::warning(&m_view, "Ladybird", qstring_from_akstring(message));
|
||||
}
|
||||
|
||||
virtual bool page_did_request_confirm(String const&) override
|
||||
virtual bool page_did_request_confirm(String const& message) override
|
||||
{
|
||||
return false;
|
||||
auto result = QMessageBox::question(&m_view, "Ladybird", qstring_from_akstring(message),
|
||||
QMessageBox::StandardButton::Ok | QMessageBox::StandardButton::Cancel);
|
||||
|
||||
return result == QMessageBox::StandardButton::Ok;
|
||||
}
|
||||
|
||||
virtual String page_did_request_prompt(String const&, String const&) override
|
||||
|
|
Loading…
Reference in a new issue