This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/public/assets/scripts/module-shims.js
David Taylor 851bd78347
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.
2022-08-23 19:28:22 +01:00

34 lines
1.1 KiB
JavaScript

define("I18n", ["exports"], function (exports) {
return I18n;
});
define("htmlbars-inline-precompile", ["exports"], function (exports) {
exports.default = function tag(strings) {
return Ember.Handlebars.compile(strings[0]);
};
});
define("ember-addons/ember-computed-decorators", [
"discourse-common/utils/decorators",
"discourse-common/lib/deprecated",
], function (decorators, deprecated) {
deprecated.default(
"ember-addons/ember-computed-decorators is deprecated. Use discourse-common/utils/decorators instead.",
{ since: "2.4", dropFrom: "3.0" }
);
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;
};
});