mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00:00
LibWeb: Pass link target to HtmlView's on_link_click callback
This commit is contained in:
parent
95b51e857d
commit
061205b3b3
5 changed files with 5 additions and 4 deletions
|
@ -151,7 +151,7 @@ int main(int argc, char* argv[])
|
|||
open_page(path);
|
||||
};
|
||||
|
||||
html_view.on_link_click = [&](const String& href) {
|
||||
html_view.on_link_click = [&](const String& href, auto&) {
|
||||
char* current_path = strdup(history.current().characters());
|
||||
char* dir_path = dirname(current_path);
|
||||
char* path = realpath(String::format("%s/%s", dir_path, href.characters()).characters(), nullptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue