1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-02 22:22:07 +00:00

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

This commit is contained in:
Linus Groh 2023-03-05 17:36:59 +00:00
parent eb4842dfa1
commit c219e6d9c1
3 changed files with 19 additions and 27 deletions

View file

@ -119,7 +119,6 @@ public:
// https://html.spec.whatwg.org/multipage/browsers.html#dom-parent
WindowProxy* parent();
WebIDL::ExceptionOr<void> post_message_impl(JS::Value, DeprecatedString const& target_origin);
WebIDL::ExceptionOr<JS::Value> structured_clone_impl(JS::VM& vm, JS::Value);
DeprecatedString name() const;
@ -145,6 +144,8 @@ public:
bool confirm(Optional<String> const& message);
Optional<String> prompt(Optional<String> const& message, Optional<String> const& default_);
void post_message(JS::Value message, String const&);
private:
explicit Window(JS::Realm&);
@ -258,7 +259,6 @@ private:
JS_DECLARE_NATIVE_FUNCTION(outer_width_getter);
JS_DECLARE_NATIVE_FUNCTION(outer_height_getter);
JS_DECLARE_NATIVE_FUNCTION(post_message);
JS_DECLARE_NATIVE_FUNCTION(structured_clone);
JS_DECLARE_NATIVE_FUNCTION(local_storage_getter);