Questions tagged [custom-events]

The custom-events tag is an ambigious tag used when a question targets an event in an event-driven system created an maintained by the asker him or her -self.

The custom-events tag is an ambigious tag used when a question targets an event in an event-driven system created an maintained by the asker him or her -self. This tag should be used with care, and only if the question is about creating, triggering or handling an event that is not part of the default event-handling in the "system" or technology that otherwise is at question.

253 questions
6
votes
1 answer

How to extend jQuery's animate-step function

Any ideas how to extend the step-function in jQuery 1.6+? I've made a special-event to trigger a custom-event on each animated step. However since jQuery's animation method was changed, or rather the step function is not longer extendable ($.fx.step…
yckart
  • 32,460
  • 9
  • 122
  • 129
6
votes
1 answer

Javascript event dispached in a popup window that has been redirected

I have a page A that opens a popup to B. Page B, after some jobs, always redirects to another page C in the pop up. Page C then dispatches an event to send some data to page A, but page A has no reference to page C to register the event handler. The…
Paolo Dragone
  • 939
  • 1
  • 11
  • 27
5
votes
4 answers

Is it possible to dispatch a svelte custom event with a target object?

Is it possible to dispatch a svelte event (created with createEventDispatcher) with a target object like a native browser event? I.e. receiving on the handler side event.target.value instead of event.detail.
LongHike
  • 4,016
  • 4
  • 37
  • 76
5
votes
1 answer

Custom Data for Custom Events in HockeyApp

Context: HockeyApp can track custom events which is a feature that is currently available via the Preseason program. There are limitations to custom events including a limit of 300 unique event names per app per week. An event can be tracked by…
5
votes
1 answer

How to track custom JavaScript event in Google Tag Manager?

I have a custom JS event that fires when accordion panel is opened. I would like to track the opening as Google Analytics event with panel id as the event label. Using the old non-GTM approach I would do it like…
Joudicek Jouda
  • 792
  • 2
  • 13
  • 30
4
votes
2 answers

Passing anonymous function to custom event trigger in Javascript/jQuery

I'm trying to trigger custom events on DOM elements and pass anonymous functions to be executed when the event is triggered (using jQuery). So something like this: $(some-dom).live("custom_event", function(evtObj, data, callback) { //do some…
Jay
  • 3,471
  • 4
  • 35
  • 49
4
votes
1 answer

Java Flight Recorder - how to extract the values of a custom event field?

Java Flight Recorder is now a part of OpenJDK 11 and offers the usage of custom events. After a successful recording, I want to reuse the information within the events (especially my own custom events), but somehow I am unable to read the field…
Matécsa Andrea
  • 532
  • 1
  • 6
  • 15
4
votes
1 answer

How do I add custom events to classes in node?

So I'm just picking up node and I'm wondering how do I add custom events to a class. Code below of my attempt. Essentially just creating a simple farm class, and every time the number of animals change, I display the new number. The event I'm trying…
abc
  • 59
  • 6
4
votes
2 answers

Dispatching CustomEvent with dot in name do not trigger jQuery.on() event listener

I've used jQuery version 2.2.4 and tried to capture event - no luck. Is there any way to fix issue? This code works: window.addEventListener('test.namespace', e => console.log('CustomEvent with namespace captured by vanilla')); This does not…
iyel
  • 125
  • 1
  • 3
  • 9
4
votes
3 answers

Call custom Event once (Game Development)

So i am writing a rpg java game and decided to use custom events to make the communication between two classes easier. At first i wrote an "enemyDeathEvent" to let the player know if an enemy died. First i made my EnemyListener: public interface…
AvarionDE
  • 160
  • 11
4
votes
2 answers

admob mediation custom event Request Error: No ad to show from all configured ad networks

I followed the custom event example at developers.google.com, but failed to receive ad from the custom ad network with the error in title. After I requesting the ad for custom event, requestBannerAd:parameter:label:request: in class CustomAd did…
smilingpoplar
  • 1,065
  • 1
  • 15
  • 26
3
votes
1 answer

How to capture Custom Events from sibling in JS? Is it even possible?

I understand the idea behind capturing and bubbling of events in Js. The event is either being passed to the parents of the dispatching Element or it is passed to the other direction - the child elements of the dispatching Element. Unfortunately I…
Kerem
  • 489
  • 5
  • 21
3
votes
4 answers

CustomEvent listener callback is firing twice?

I've created a custom element: const templ = document.createElement('template'); templ.innerHTML = ` `; class SlideButton extends HTMLElement { constructor() { super(); // Attach a shadow root to the…
Nasa
  • 317
  • 3
  • 11
3
votes
1 answer

What are the use cases for naming an event handler method "onEvent"

Summary: This is ultimately a question about Vue.js(although I assume it applies to JavaScript in general). First a bit of background: I noticed something in the Angular style guide which serves as a basis for the question about Vue. Angulars…
Brandon
  • 1,747
  • 2
  • 13
  • 22
3
votes
1 answer

Custom Events Java

I'm trying to write a program in which I have to create custom events. I have seen some examples like Mr.Happy Object. My problem is that I'm not allowed to fire events myself and they have to be fired when a particular event has happened. Like a…
1
2
3
16 17