mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-14 19:06:55 +02:00
UI event handlers currently return a boolean where false means the event was cancelled by a script on the page, or otherwise dropped. It has been a point of confusion for some time now, as it's not particularly clear what should be returned in some special cases, or how the UI process should handle the response. This adds an enumeration with a few states that indicate exactly how the WebContent process handled the event. This should remove all ambiguity, and let us properly handle these states going forward. There should be no behavior change with this patch. It's meant to only introduce the enum, not change any of our decisions based on the result. (cherry picked from commit 541968b30dc50208f473566498100769711f10c8; amended to fix tiny conflict in ConnectionFromClient.h due to serenity not having #1182 yet)