summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/DOM/Document.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-04-04 22:12:37 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-04 22:12:37 +0200
commit9b0bfcb8b75fa9bae0061af0cf229ccd1aacb21c (patch)
tree09523e8d08a283a719d788aead828a84df6721ee /Libraries/LibWeb/DOM/Document.h
parent5e40aa182b9507559f20d94902a2ae868afe7393 (diff)
downloadserenity-9b0bfcb8b75fa9bae0061af0cf229ccd1aacb21c.zip
LibWeb: Handle javascript: URLs inside LibWeb :^)
This patch makes it possible to execute JavaScript by clicking on an anchor element with href="javascript:your_script_here()".
Diffstat (limited to 'Libraries/LibWeb/DOM/Document.h')
-rw-r--r--Libraries/LibWeb/DOM/Document.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibWeb/DOM/Document.h b/Libraries/LibWeb/DOM/Document.h
index a578ff2152..18110088ad 100644
--- a/Libraries/LibWeb/DOM/Document.h
+++ b/Libraries/LibWeb/DOM/Document.h
@@ -121,6 +121,8 @@ public:
JS::Interpreter& interpreter();
+ JS::Value run_javascript(const StringView&);
+
private:
virtual RefPtr<LayoutNode> create_layout_node(const StyleProperties* parent_style) const override;