summaryrefslogtreecommitdiff
path: root/src/protocolhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocolhandler.cpp')
-rw-r--r--src/protocolhandler.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/protocolhandler.cpp b/src/protocolhandler.cpp
index 5b400582..602ac016 100644
--- a/src/protocolhandler.cpp
+++ b/src/protocolhandler.cpp
@@ -85,6 +85,14 @@ bool ProtocolHandler::handle(const QNetworkRequest &request, QWebFrame *frame)
if( _url.protocol() == QLatin1String("http") || _url.protocol() == QLatin1String("https") )
return false;
+ // javascript handling
+ if( _url.protocol() == QLatin1String("javascript") )
+ {
+ QString scriptSource = _url.authority();
+ QVariant result = frame->evaluateJavaScript(scriptSource);
+ return true;
+ }
+
// "mailto" handling
if ( _url.protocol() == QLatin1String("mailto") )
{