Skip to content

Dispatch events with both CustomEvent and jQuery#3185

Open
TiTidom-RC wants to merge 1 commit intojeedom:developfrom
TiTidom-RC:native-customevent-for-plugins
Open

Dispatch events with both CustomEvent and jQuery#3185
TiTidom-RC wants to merge 1 commit intojeedom:developfrom
TiTidom-RC:native-customevent-for-plugins

Conversation

@TiTidom-RC
Copy link
Copy Markdown
Contributor

Description

Problem
Currently, only core Jeedom events (hardcoded list) can use [dispatchEvent] (native CustomEvent). Plugins are forced to use jQuery only.

Solution
Removed the restricted event list. All events (core and plugins) now use :

  • [dispatchEvent] : for all events (native standard)
  • jQuery [trigger] : maintained for events with data (backward compatibility, like before)

Events are now dispatched using both the native CustomEvent API and jQuery's trigger for backward compatibility. This ensures that all listeners, regardless of implementation, receive the events.

Suggested changelog entry

Support natif des CustomEvent pour les plugins

Related issues/external references

Fixes #

Types of changes

  • Bug fix (non-breaking change which fixes)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
    • This change is only breaking for integrators, not for external standards or end-users.
  • Documentation improvement

PR checklist

Events are now dispatched using both the native CustomEvent API and jQuery's trigger for backward compatibility. This ensures that all listeners, regardless of implementation, receive the events.
@zoic21 zoic21 requested a review from Salvialf January 30, 2026 10:09
@Salvialf Salvialf deleted the branch jeedom:develop March 31, 2026 17:44
@Salvialf Salvialf closed this Mar 31, 2026
@Salvialf Salvialf reopened this Mar 31, 2026
@NebzHB
Copy link
Copy Markdown
Contributor

NebzHB commented Apr 16, 2026

Hello, maybe add a subscription system or something ? to not overflood listeners ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants