Closed
Bug 230222
Opened 21 years ago
Closed 21 years ago
An Old NS 4.x style plugin made to be NS 6.x/7.x compatible cannot send events to the javascript, but javascript can call it's methods.
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: mozilla, Assigned: peterlubczynski-bugs)
Details
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Build Identifier: Old NS 4.x Style Plugins Never Recieve NPP_GetValue() when they want to fire events We have ported an old NS 4.x plugin to NS 6.x/7.x and it works fine if you call methods that the plugin exports. NPP_GetValue() is called and we get a container object. However, we are unable to communicate with javascript. For example: <SCRIPT language=javascript> MyObject_SomeEvent() { alert("called my event!"); } </SCRIPT> <embed type=’application/x-myobject’ SRC=’whatever’ START=’Auto’ BORDER=’0’ name=’MyObject’> <SCRIPT language=”javascript” for=”MyObject” event=”SomeEvent” type=”text/javascript”> <!— MyObject_SomeEvent(); //> </SCRIPT> Other variations of this same type of scripting also do not work. However, doing this: MyObject.SomeMethod(); Does work properly and NPP_GetValue() is called. Events can never be fired however and NPP_GetValue() will never be called to populate any instance of the object that wants to fire an event even if the same object got NPP_GetValue() to call a native method. Going over the documentation many times has not resolved the issue. Reproducible: Always Steps to Reproduce: 1.Port NS 4.x plugin to NS 7.x 2.Attempt to register an event callback in the JavaScript 3.The event can never be fired. Actual Results: Event ever fires. Happens on Netscape 6.2.3, 7.1 are the ones I have tried. The .xpt file is in the components directory, the .class & .dll are in the plugins directory. Even if you put everything in both directories does not seem to matter.
Have you tried a recent version of Mozilla, such as 1.6b?
Assignee: events → peterlubczynski-bugs
Component: Event Handling → Plug-ins
Yes, Mozilla 1.6b does not work as well. It has the same problem, the methods exported by the old plugin are able to be called from the javascript, but events are not able to be dispatched to the javascript due to never getting the NPP_GetValue as according to the NS 4.x upgrade plugin to NS 6.x/7.x spec that this function is called 2x, once to create the instance. So we don't have an instance.
Assignee | ||
Comment 3•21 years ago
|
||
<SCRIPT FOR=... EVENT=...> is an IE/Active-X thing only. To call javascript from your plugin see: http://www.mozilla.org/projects/plugins/bi-directional-plugin-scripting.html
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Updated•2 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•