Closed
Bug 81835
Opened 25 years ago
Closed 22 years ago
Need a way to add DOM event listeners
Categories
(Core Graveyard :: Embedding: APIs, defect)
Core Graveyard
Embedding: APIs
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 129602
Future
People
(Reporter: galfandary, Assigned: adamlock)
Details
Attachments
(1 file)
|
7.26 KB,
patch
|
Details | Diff | Splinter Review |
Currently the only way to do this (AFAIK) is to go through private interfaces.
| Reporter | ||
Updated•25 years ago
|
Target Milestone: --- → mozilla0.9.1
Updated•25 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Moving to 0.9.2
What kind of listeners do you intend to register? C++ or Javascript? Are you
interested in listening to events bubbling up from subframes?
Target Milestone: mozilla0.9.1 → mozilla0.9.2
| Reporter | ||
Comment 2•25 years ago
|
||
A mouse listener like the one used in TestGtkEmbed for example.
Updated•25 years ago
|
Target Milestone: mozilla0.9.2 → mozilla0.9.3
Comment 3•24 years ago
|
||
Eh? Do you mean an XPCOM service for adding DOM event listeners?
Sort of like the MailNews MsgMailSession?
http://www.mozilla.org/mailnews/arch/events.html
Or like Embedded has for various browser status things?
http://www.mozilla.org/projects/embedding/listeners.html
That would be sweet.
Updated•24 years ago
|
Target Milestone: mozilla0.9.3 → mozilla0.9.4
It may be possible to extend the impl of nsIWebBrowser to support DOM listeners.
Obtaining the nsIEventReceiver interface is very nasty, as GetEventReceiver
demonstrates.
http://lxr.mozilla.org/seamonkey/source/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp#83
However once you obtain the nsIEventReceiver, the methods for subscribing
(addEventListenerByIID & removeEventListenerByIID) are very similar to
nsIWebBrowser's addWebBrowserListener & removeWebBrowserListener. It should be
possible to map calls from one onto the other without breaking the semantics of
the interface.
This patch moves the helper function GetEventReceiver from
nsDocShellTreeOwner.cpp into the nsWebBrowser class and extends
nsIWebBrowser::AddWebBrowserListener & RemoveWebBrowserListener such that they
use it to (de)register DOM event listener objects.
Comment on attachment 113621 [details] [diff] [review]
Patch
Can I have an r/sr on this patch to the webbrowser object. It extends
addWebBrowserListener / removeWebBrowserListener so that embedders may call
these methods to add / remove DOM event listeners.
Most of the patch is just moving a helper method from one source file to
another and making it a member of the nsWebBrowser class.
Thanks
Attachment #113621 -
Flags: superreview?(blizzard)
Attachment #113621 -
Flags: review?(ccarlen)
Comment 8•23 years ago
|
||
Looks nice. No problem with the code itself, but one question: are you sure that
this
+ rv = rcvr->AddEventListenerByIID(domListener, aIID);
maintains only a weak reference to the listener?
Updated•23 years ago
|
Attachment #113621 -
Flags: superreview?(blizzard)
Comment 9•22 years ago
|
||
Does someone know the reason this has never been checked in ?
Comment 10•22 years ago
|
||
Oh addEventListenerByIID addref the listener :/
Comment 11•22 years ago
|
||
marco@gnome.org: it never got reviews.
http://www.mozilla.org/hacking/life-cycle.html
Comment 12•22 years ago
|
||
*** This bug has been marked as a duplicate of 129602 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Updated•20 years ago
|
Attachment #113621 -
Flags: review?(ccarlen)
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•