mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-04-20 02:40:27 +00:00
parent
2c11e03582
commit
f9a996650b
Notes:
github-actions[bot]
2025-12-30 11:41:25 +00:00
Author: https://github.com/shannonbooth
Commit: f9a996650b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7047
Reviewed-by: https://github.com/gmta ✅
Reviewed-by: https://github.com/trflynn89
45 changed files with 770 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Andreas Kling <andreas@ladybird.org>
|
||||
* Copyright (c) 2024, Shannon Booth <shannon@ladybird.org>
|
||||
* Copyright (c) 2024-2025, Shannon Booth <shannon@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
|
@ -524,4 +524,15 @@ void HTMLHyperlinkElementUtils::follow_the_hyperlink(Optional<String> hyperlink_
|
|||
MUST(target_navigable->navigate({ .url = url.release_value(), .source_document = hyperlink_element_utils_document(), .referrer_policy = referrer_policy, .user_involvement = user_involvement }));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/links.html#api-for-a-and-area-elements:extract-an-origin
|
||||
Optional<URL::Origin> HTMLHyperlinkElementUtils::hyperlink_element_utils_extract_an_origin() const
|
||||
{
|
||||
// 1. If this's url is null, then return null.
|
||||
if (!m_url.has_value())
|
||||
return {};
|
||||
|
||||
// 2. Return this's url's origin.
|
||||
return m_url->origin();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue