mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 18:35:06 +00:00
WebContent: Plumb link clicks to the WebContentView :^)
You can now react to links being clicked via the on_link_click hook.
This commit is contained in:
parent
fd65a24834
commit
32243e1df2
8 changed files with 48 additions and 1 deletions
|
@ -56,6 +56,11 @@ int main(int argc, char** argv)
|
|||
statusbar.set_text("");
|
||||
};
|
||||
|
||||
view.on_link_click = [&](auto& url, auto&, auto) {
|
||||
if (url.is_valid())
|
||||
view.load(url);
|
||||
};
|
||||
|
||||
view.load("file:///res/html/misc/welcome.html");
|
||||
|
||||
return app->exec();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue