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

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

This commit is contained in:
Linus Groh 2023-03-05 16:02:35 +00:00
parent a6f8b18649
commit a0b73eb5f7
3 changed files with 19 additions and 24 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);
void alert_impl(DeprecatedString const&);
bool confirm_impl(DeprecatedString const&);
DeprecatedString prompt_impl(DeprecatedString const&, DeprecatedString const&);
i32 request_animation_frame_impl(WebIDL::CallbackType& js_callback);
@ -143,6 +142,9 @@ public:
Vector<JS::NonnullGCPtr<Plugin>> pdf_viewer_plugin_objects();
Vector<JS::NonnullGCPtr<MimeType>> pdf_viewer_mime_type_objects();
// JS API functions
void alert(String const& message = {});
private:
explicit Window(JS::Realm&);
@ -265,7 +267,6 @@ private:
JS_DECLARE_NATIVE_FUNCTION(is_secure_context_getter);
JS_DECLARE_NATIVE_FUNCTION(open);
JS_DECLARE_NATIVE_FUNCTION(alert);
JS_DECLARE_NATIVE_FUNCTION(confirm);
JS_DECLARE_NATIVE_FUNCTION(prompt);
JS_DECLARE_NATIVE_FUNCTION(set_interval);