1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 13:25:08 +00:00

LibWeb: Remove exit for javascript urls in anchor activation_behavior()

This early return is no longer needed because Navigable::navigate()
can process `javascript:` urls.

Fixes https://github.com/SerenityOS/serenity/issues/22052
This commit is contained in:
Aliaksandr Kalenik 2023-11-25 13:58:13 +01:00 committed by Andreas Kling
parent 80d1c93edf
commit afe24883b7
3 changed files with 15 additions and 5 deletions

View file

@ -57,11 +57,6 @@ void HTMLAnchorElement::activation_behavior(Web::DOM::Event const&)
if (href().is_empty())
return;
// AD-HOC: follow_the_hyperlink currently doesn't navigate properly with javascript urls
// EventHandler::handle_mouseup performs the navigation steps for javascript urls instead
if (href().starts_with_bytes("javascript:"sv))
return;
// 2. Let hyperlinkSuffix be null.
Optional<String> hyperlink_suffix {};