Ember/5/Ember Jquery Legacy

1.0.1Last update Jul 24, 2024
by@Codemod
Ember
migration

Using event object APIs that are specific to jQuery.Event, such as originalEvent, is deprecated in Ember.js v3.3. This codemod ensures the access to the native event without triggering any deprecations via wrapping the event with the normalizeEvent function provided by ember-jquery-legacy.

Before

export default Component.extend({
click(event) {
let nativeEvent = event.originalEvent;
},
});

After

import { normalizeEvent } from 'ember-jquery-legacy';
export default Component.extend({
click(event) {
let nativeEvent = normalizeEvent(event);
},
});

Build custom codemods

Use AI-powered codemod studio and automate undifferentiated tasks for yourself, colleagues or the community

background illustrationGet Started Now