mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWeb: Make a elements honor base element's target
This commit is contained in:
parent
79d6d5a7fa
commit
f839f1b44b
Notes:
github-actions[bot]
2025-02-16 08:22:46 +00:00
Author: https://github.com/Psychpsyo
Commit: f839f1b44b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3576
8 changed files with 50 additions and 8 deletions
|
@ -948,8 +948,10 @@ String HTMLElement::get_an_elements_target(Optional<String> target) const
|
|||
if (auto maybe_target = attribute(AttributeNames::target); maybe_target.has_value()) {
|
||||
target = maybe_target.release_value();
|
||||
}
|
||||
// FIXME: 2. Otherwise, if element's node document contains a base element with a target attribute,
|
||||
// 2. Otherwise, if element's node document contains a base element with a target attribute,
|
||||
// set target to the value of the target attribute of the first such base element.
|
||||
if (auto base_element = document().first_base_element_with_target_in_tree_order())
|
||||
target = base_element->attribute(AttributeNames::target);
|
||||
}
|
||||
|
||||
// 2. If target is not null, and contains an ASCII tab or newline and a U+003C (<), then set target to "_blank".
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue