1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:57:43 +00:00

LibWeb/HTML: Port Window.confirm() to IDL

This commit is contained in:
Linus Groh 2023-03-05 17:21:24 +00:00
parent a0b73eb5f7
commit bbffda5f55
3 changed files with 12 additions and 19 deletions

View file

@ -66,7 +66,6 @@ public:
void set_import_maps_allowed(bool import_maps_allowed) { m_import_maps_allowed = import_maps_allowed; }
WebIDL::ExceptionOr<JS::GCPtr<HTML::WindowProxy>> open_impl(StringView url, StringView target, StringView features);
bool confirm_impl(DeprecatedString const&);
DeprecatedString prompt_impl(DeprecatedString const&, DeprecatedString const&);
i32 request_animation_frame_impl(WebIDL::CallbackType& js_callback);
void cancel_animation_frame_impl(i32);
@ -144,6 +143,7 @@ public:
// JS API functions
void alert(String const& message = {});
bool confirm(Optional<String> const& message);
private:
explicit Window(JS::Realm&);
@ -267,7 +267,6 @@ private:
JS_DECLARE_NATIVE_FUNCTION(is_secure_context_getter);
JS_DECLARE_NATIVE_FUNCTION(open);
JS_DECLARE_NATIVE_FUNCTION(confirm);
JS_DECLARE_NATIVE_FUNCTION(prompt);
JS_DECLARE_NATIVE_FUNCTION(set_interval);
JS_DECLARE_NATIVE_FUNCTION(set_timeout);