DEV: Enable jquery-integration runtime deprecation (#18057)
Omitting the flag from optional-features enables the runtime deprecation notice. Also introduces `ember-jquery-legacy` which can be used to migrate to the new behaviour early. Details at https://deprecations.emberjs.com/v3.x/#toc_jquery-event Core does not appear to make use of `originalEvent` in Ember event handlers. When searching for `originalEvent` there are some matches which relate to our pan-events mixin, but this is our own implementation and not affected by this deprecation.
This commit is contained in:
parent
1b180a3bdb
commit
851bd78347
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"application-template-wrapper": false,
|
"application-template-wrapper": false,
|
||||||
"default-async-observers": true,
|
"default-async-observers": true
|
||||||
"jquery-integration": true
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,3 +18,16 @@ define("ember-addons/ember-computed-decorators", [
|
||||||
);
|
);
|
||||||
return decorators;
|
return decorators;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Based on https://github.com/emberjs/ember-jquery-legacy
|
||||||
|
// The addon has out-of-date dependences, but it's super simple so we can reproduce here instead:
|
||||||
|
define("ember-jquery-legacy", ["exports"], function (exports) {
|
||||||
|
exports.normalizeEvent = function (e) {
|
||||||
|
if (e instanceof Event) {
|
||||||
|
return e;
|
||||||
|
}
|
||||||
|
// __originalEvent is a private escape hatch of Ember's EventDispatcher to allow accessing `originalEvent` without
|
||||||
|
// triggering a deprecation message.
|
||||||
|
return e.__originalEvent || e.originalEvent;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in New Issue