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 =…
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