Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/browser-plugin/scriptable.cpp
diff options
context:
space:
mode:
authorTommi Komulainen <tko@litl.com>2009-08-25 10:46:11 (GMT)
committer Marco Pesenti Gritti <marcopg@litl.com>2010-07-27 22:04:22 (GMT)
commit60cc60c16e52601993c77076dab3eeb9d1f0ab1a (patch)
tree70c6252fbcaf4eddb0dc168b9082d111cce0589e /browser-plugin/scriptable.cpp
parentae40e6243010b7049525f02b3d6d6f6497d1a70c (diff)
browser-plugin: notify browser of title changes
PDF loading may (or may not) finish after the browser has had its change to set up the magicWrapper so let the browser know about the document title. Example: let embed = document.embeds[0]; embed.magicWrapper = { onTitleChanged: function() { // update document / page title to that of the PDF file document.title = embed.title; } };
Diffstat (limited to 'browser-plugin/scriptable.cpp')
-rw-r--r--browser-plugin/scriptable.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/browser-plugin/scriptable.cpp b/browser-plugin/scriptable.cpp
index ff4f064..6272c7d 100644
--- a/browser-plugin/scriptable.cpp
+++ b/browser-plugin/scriptable.cpp
@@ -287,6 +287,10 @@ ScriptablePluginObject::SetProperty (NPIdentifier name, const NPVariant *value)
}
mMagicWrapper = newWrapper;
+ if (plugin->mTitle) {
+ CallBrowser ("onTitleChanged");
+ }
+
return true;
}