evaluateJavaScript(argument);}Now to use" name="description" /> evaluateJavaScript(argument);}Now to use" />
7252

how to start the javascript function in my firebreath plugin

Question:

I have implemented a javascript function in firebreath plugin file 'MyPluginProject.cpp'

like

void MyPluginProjectAPI::MyJsThings() { std::string argument = "my javascript functionality goes here"; m_host->evaluateJavaScript(argument); }

Now to use the MyJsThings in my webpages I have created <object> for the plugin. Now I can call MyJsThings by calling it in my javascript code like below

plugin.MyJsThings()

This is the very basic thing. Now I don't want to call MyJsThings method in my javascript. I am just creating object for the plugin by below code.

<object type="application/x-my-plugin-project" id="plugin" style="width:0px;height:0px;"> <param id="onload" value="alert('Plugin Loaded');"> </object>

When I load my page I want my method MyJsFunction has to be called so that my js functionalities will do the remaining things.<br /> My main aim is to call the function MyJsFunction when the plugin is loaded, not in any where in the html script.

Answer1:

Sounds like what you really want is to use the onPluginLoad method in your PluginCore-derived object.

Note that you would have found this if you'd read the getting started pages on the website and/or looked through the FBTestPlugin example -- highly recommended reading.

Recommend

  • Visual Studio 2017 extension - VSToolsPath not working
  • Issue with TFS build definition and WCF service in a Web Site “Project”
  • how can i Restrict map to show only the selected country?
  • Why do I get a “SSL error: called a function you should not call” with Django
  • g++ undefined reference to library symbols [duplicate]
  • OpenLayers - add click event on ol.Overlay
  • Excel - Array formula as name range not working
  • Setting properties in triggered build
  • Loading javascript functions to webview in Android Kitkat
  • Add basemap to SpatialPointDataFrames using R
  • sys.path including py.test rootdir to make tests import relative to project root
  • how to get the sub project path in sbt multi project build
  • Retrieve a thumbnail of a video
  • Database Deployment - An error occurred during deployment plan generation. Deployment cannot continu
  • How to call .cshtml file directly with .cshtml extension from browser without using MVC
  • How to display rendered html content in text widget of tkinter in python 3.4.x
  • Converting web app to ASP.NET MVC 3 - how to enable Razor views?
  • how to submit a form in wordpress
  • Theme-ing applications in Delphi XE
  • maven compile fails because i have a non-maven jar
  • iOS Localization Doesn't Work with More Than 63 Files
  • why calling cd shell command through system() or execvp() from a child process won't work?
  • QLineEdit password safety
  • Why winpcap requires both .lib and .dll to run?
  • AT Commands to Send SMS not working in Windows 8.1
  • Rails 2: use form_for to build a form covering multiple objects of the same class
  • Acquiring multiple attributes from .xml file in c#
  • Free memory of cv::Mat loaded using FileStorage API
  • How do I configure my settings file to work with unit tests?
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • Change div Background jquery
  • How does Linux kernel interrupt the application?
  • How can I remove ASP.NET Designer.cs files?
  • Is it possible to post an object from jquery to bottle.py?
  • unknown Exception android
  • Busy indicator not showing up in wpf window [duplicate]
  • Observable and ngFor in Angular 2
  • UserPrincipal.Current returns apppool on IIS
  • Why do underscore prefixed variables exist?
  • java string with new operator and a literal