Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8689181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:34:38+00:00 2026-06-12T23:34:38+00:00

I am trying to make a NPAPI plugin for chrome on Mac. I have

  • 0

I am trying to make a NPAPI plugin for chrome on Mac. I have written a basic npapi plugin and a basic manifest.json and background.html to load it. My background.html has a embed tag to fetch the plugin by Mimetype.

Now when I load my unpackaged extension from Chrome and try to debug the c++ code (in xcode4), I found that the functions are getting called in following order:

  1. NP_Initialize
  2. NP_GetEntryPoints
  3. NPP_New
  4. NPP_Destroy

After this when I click on the extension icon, the popup.html should get executed. My popup.html has these lines:

line 1:

var pluginObj = document.getElementById("pluginId");

line 2:

pluginObj.Myfunction();

But on line 1, NP_Getvalue() function doesnt get called and so a “scriptable NPObject” is not instantiated. On line 2, the Chrome JavaScript console says:

Error in event handler for 'undefined': Object #<HTMLEmbedElement> has no method 'Myfunction' TypeError: Object #<HTMLEmbedElement> has no method 'Myfunction'

Why does the NPP_Destroy functions gets called immediately after the NPP_New function?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T23:34:39+00:00Added an answer on June 12, 2026 at 11:34 pm

    Have you done drawing and event model negotiation in your plugin? Starting with Chrome 22 for Mac, the long-deprecated QuickDraw and Carbon models are no longer supported, and if your plugin doesn’t negotiate modern models, it will be destroyed just after init. See here for example code that does this.

    (Yes, it’s unfortunate that the default models for 32-bit plugins are the old, deprecated models, but there’s no way to change that in the spec due to all the existing plugins that expect the old behavior.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to make a chrome plugin but Chrome API doesn't give me
Trying to make a quick and dirty news system. Have a basic XML file.
I'm trying make an entity with doctrine that has three associations with other entities
I'm trying to make a video download panel for Chrome likes Real Player's one
Trying to make td elements clickable. Here's my HTML: <td id=A3 class= open-square><a href=/gameplay/A3></a></td>
Trying to make an app using phonegap 1.4.1 + phonegap's childbrowser plugin. I've been
I am trying make a JSON call to a server using HttpClient API. The
in my application I am trying make a requst but i have received an
Right now I'm trying make some browser based game. But I have little questions.
I'm trying make Ethos framework on Mac OS Lion. git://git.dronelabs.com/ethos Here result of ./configure:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.