Questions tagged [dispatchevent]
170 questions
2
votes
0 answers
event.dispatchEvent is not a function (no jQuery!)
In a main.js-File I have the following function
function fireCustomEvent(element, event) {
if (document.createEventObject) {
// dispatch for IE
var evt = document.createEventObject();
return element.fireEvent('on' + event, evt);
}
else…

Niklas Hantke
- 353
- 1
- 5
- 20
2
votes
2 answers
java.awt.Component.dispatchEvent()'s purpose and behavior
Most of the tutorials and documentation that I've been reading seem to indicate that most component communication takes place by subscription using listeners.
The Java docs indicate that java.awt.Component#dispatchEvent(AWTEvent e):
Dispatches an…

Kaleb Pederson
- 45,767
- 19
- 102
- 147
2
votes
1 answer
SemiClosedSlidingDrawer onClick not dispatched when semi-collapsed
i'm using a SemiClosedSlidingDrawer (http://pastebin.com/FtVyrcEb) and i've added on content part some buttons on the top of slider which are always visibles.
The problems is that they are clickable (or click event is dispatched) only when slider…

Davide
- 43
- 1
- 6
2
votes
3 answers
How to call a function in a Class from another Class?
Update: Modified title to better reflect my question
Hi everybody :)
My question today revolves around a CustomEvent I'm trying to send from one sub Class to another.
I've used my CustomEvent class to pass an event from a sub Class to my main class…

Leon Gaban
- 36,509
- 115
- 332
- 529
2
votes
1 answer
Re-dispatch MouseEvent via JScrollPane abnormal behaviour
I have modified a little code from here: https://stackoverflow.com/a/13357269/1360074
Since there is known bug with JScrollPane not passing MouseEvent up I did a workaround with FakeMouseListener.
import java.awt.BorderLayout;
import…

Nikolay Kuznetsov
- 9,467
- 12
- 55
- 101
2
votes
0 answers
Dispatchevent not working in native extension for ios
I've build a native extension for my project to fire two event about login and logout,this is code (NdPlatformExtension.as), the extIntance for singleton have tried but get same result,so ignore it.
private static const API_LOGIN_CALL:String =…

user1740373
- 21
- 1
2
votes
1 answer
Using < args > in Magento observer declaration
This is both a question and kind of an answer. But I still would love to find a better solution and you may shed a light on this.
When creating an observer in Magento, the method that is responsible for dispatching it and calling the function that…

Hervé Guétin
- 4,392
- 4
- 29
- 36
1
vote
0 answers
I want to dispatch an event. But dispatchEvent is just returnig true and doing nothing
I want to use read aloud extension in my angular app. if we select some text and press alt+P, we can hear that text. Now I want to use a button to dispatch a key board event of alt+P. But it is not working. Please guide me if someone has answer.
I…

Ali Jawad
- 11
- 1
1
vote
1 answer
Salesforce lwc lightning/modal dispatchEvent
Documentation - https://developer.salesforce.com/docs/component-library/bundle/lightning-modal/documentation - modal - API 56
When I try to fire an event from the modal window to the parent window - completely according to the example from the…

Vitaly
- 11
- 1
1
vote
0 answers
How to execute a series of dispatchevents in javascript and wait after each one is completed
I'm writing a chrome extension where I need to simulate user clicks on a webpage before pasting information into fields. The page has a listbox with onchange javascript (not mine) attached to it. Depending on the selection of the listbox the page…

Noobcoder
- 11
- 2
1
vote
0 answers
dispatching ClipboardEvent on textarea element does not work
I wont to simulate paste event trough javascript as shown on snipped below
1
vote
1 answer
Wait for all handlers of a given event to complete
I am writing a Javascript library and I would like to know if it is possible to do the following.
I want to trigger a custom event on an element, but I don't know a priori which event handler(s) have been subscribed to this event, nor how…

syl
- 41
- 5
1
vote
3 answers
Mouse event for download functionality not working in IE
I am trying to implement a functionality to download a pdf file using javascript. My code is not working in IE 11. Any leads are much appreciated. Below is the code I am using.
saveByteArray: function(reportName, byte) {
var bytes = new…

DJ4186
- 159
- 1
- 3
- 16
1
vote
1 answer
How to dispose a JFrame and recreate it as new without exiting the application?
I have a problem where I have to use two JFrames, so we can forget about good/bad practice.
Now that when we are past this point.
My Two JFrames are
LoginFrame
MainFrame
I want to sign out of MainFrame to LoginFrame and vice versa. In doing so, I…

Bugs - not a bug
- 73
- 11
1
vote
1 answer
AS3 Custom Event not firing on Document Class ( using DispatchEvent actionscript)
Im trying to get my head round what is needed to catch event "Beep2", using dispatchEvent. The function "DoNext" is not firing, even though Im able to produce a trace result of the dispatchEvent "Beep2 true".
This code uses a CustomEvent Class to…

Simon Trent
- 13
- 3