From 60cc60c16e52601993c77076dab3eeb9d1f0ab1a Mon Sep 17 00:00:00 2001 From: Tommi Komulainen Date: Tue, 25 Aug 2009 10:46:11 +0000 Subject: 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; } }; --- (limited to 'browser-plugin/scriptable.cpp') 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; } -- cgit v0.9.1