Closed
Bug 32724
Opened 25 years ago
Closed 25 years ago
No support for scriptable 'overloaded' functions
Categories
(SeaMonkey :: General, enhancement, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: sean, Assigned: brendan)
Details
Attachments
(1 file)
(deleted),
text/plain
|
Details |
The old netscape plugin API allowed overloaded javascript functions for
plugins. IDL does not support function overloads. MS works around the
overload issue in its IDL implementation thru the use of the VARIANT datatype.
XPIDL does not allow methods which use native types (for example,
nsXPTCMiniVariant) to be scriptable.
A potential work-around for this might be to support var args in the mozilla
IDL implementation (and in the javascript engine if it's not already
there...). Or make an exception to the XPIDL native type rule for
nsXPTCVariant.
If a work-around is not available, legacy web content which calls into any of a
plugin's overloaded javascript methods will not work in mozilla.
Comment 1•25 years ago
|
||
marking this as an enhancement and cc-ing mccabe. Mike can you comment
and/or take ownership?
Severity: normal → enhancement
Component: XPCOM → All
Target Milestone: ---
Assignee | ||
Comment 2•25 years ago
|
||
Sean, can you remind us old-timers (who forget) and all the newcomers
(who never knew) exactly how the old plugin API allowed and supported
"overloaded" JS functions? Thanks,
/be
Comment 3•25 years ago
|
||
Adding jband to the cc list.
Reporter | ||
Comment 4•25 years ago
|
||
Reporter | ||
Comment 5•25 years ago
|
||
The old LiveConnect API was based on creating a java shim that mediated calls
between javascript and the c/c++ plugin. A class was created in java which
could have overloaded methods. I don't know how the javascript engine resolved
the object's method overloads... Search for "play" in music-object.js (the
javascript that wraps the Beatnik Plugin) to see overloading at work in
javascript.
Reporter | ||
Comment 6•25 years ago
|
||
Looks like nsIXPCScriptable may be the solution I'll need for this (thanks to
an October 99 post I came across in netscape.public.mozilla.xpcom by jband!).
I've confirmed the solution works when my plugin is loaded as a component (non-
embed). However, due to http://bugzilla.mozilla.org/show_bug.cgi?id=32150 I
can't confirm it works when the plugin is embedded.
Comment 8•25 years ago
|
||
Sean, can we close this and just leave 32150 open to track your other problem?
Reporter | ||
Comment 9•25 years ago
|
||
OK by me to close it. Thanks.
Comment 10•25 years ago
|
||
Closing as FIXED.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 11•25 years ago
|
||
moving from architecture product to Browser. Architecture product is going
away.
Component: All → Browser-General
Product: Architecture → Browser
Version: 5.0 → other
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•