Amit Gupta
Amit Gupta

Reputation: 21

How to get web page reference using NPAPI?

I have created a Safari plugin using webkit API and the plugin is working fine on Safari 5.0. Now the next target is to run this plugin on Safari 5.1 and as per Apple information I need to change webkit to NPAPI but I am not able to find any documentation regarding NPAPI.

When I run my plugin on safari 5.1, the GUI runs fine but when I try to get the web page reference to get the current Page URL, gets the Page mainframe for DOM to read the html source of loaded website.

How can I get web page reference and URL through NPAPI ?

Upvotes: 1

Views: 623

Answers (1)

taxilian
taxilian

Reputation: 14324

I'm really not sure I understand your question; you can get the current page URL through NPAPI by using NPN_GetValue to get the window's NPObject (NPNVWindowNPObject), then query the "location" property and then the "href" property of that.

You can also find information about npapi at:

All of that said, you may want to look at FireBreath; it'd simplify a lot for you.

Upvotes: 3

Related Questions