From 0d935ae62980856522c3b74dab39c60f09b9b880 Mon Sep 17 00:00:00 2001 From: simonihmig Date: Thu, 22 Jul 2021 18:08:53 +0200 Subject: [PATCH] Remove jQueryEventShim from link-to --- .../glimmer/lib/components/internal.ts | 24 ------------------- .../glimmer/lib/components/link-to.ts | 6 ----- 2 files changed, 30 deletions(-) diff --git a/packages/@ember/-internals/glimmer/lib/components/internal.ts b/packages/@ember/-internals/glimmer/lib/components/internal.ts index 81528e7cc2b..f3ac67a5c57 100644 --- a/packages/@ember/-internals/glimmer/lib/components/internal.ts +++ b/packages/@ember/-internals/glimmer/lib/components/internal.ts @@ -1,9 +1,7 @@ import { Owner, setOwner } from '@ember/-internals/owner'; import { guidFor } from '@ember/-internals/utils'; -import { jQuery, jQueryDisabled } from '@ember/-internals/views'; import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features'; import { assert, deprecate } from '@ember/debug'; -import { JQUERY_INTEGRATION } from '@ember/deprecated-features'; import { CapturedArguments, Destroyable, @@ -552,25 +550,3 @@ if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) { }); }; } - -export function jQueryEventShim(target: DeprecatingInternalComponentConstructor): void { - if (JQUERY_INTEGRATION) { - let { prototype } = target; - - let superListenerFor = prototype['listenerFor']; - - Object.defineProperty(prototype, 'listenerFor', { - configurable: true, - enumerable: false, - value: function listenerFor(this: InternalComponent, name: string): EventListener { - let listener = superListenerFor.call(this, name); - - if (jQuery && !jQueryDisabled) { - return (event: Event) => listener(new jQuery.Event(event)); - } else { - return listener; - } - }, - }); - } -} diff --git a/packages/@ember/-internals/glimmer/lib/components/link-to.ts b/packages/@ember/-internals/glimmer/lib/components/link-to.ts index 3bb0b105281..a823da4b978 100644 --- a/packages/@ember/-internals/glimmer/lib/components/link-to.ts +++ b/packages/@ember/-internals/glimmer/lib/components/link-to.ts @@ -5,7 +5,6 @@ import { TargetActionSupport } from '@ember/-internals/runtime'; import { isSimpleClick } from '@ember/-internals/views'; import { EMBER_MODERNIZED_BUILT_IN_COMPONENTS } from '@ember/canary-features'; import { assert, debugFreeze, deprecate, warn } from '@ember/debug'; -import { JQUERY_INTEGRATION } from '@ember/deprecated-features'; import { EngineInstance, getEngineParent } from '@ember/engine'; import { flaggedInstrument } from '@ember/instrumentation'; import { action } from '@ember/object'; @@ -22,7 +21,6 @@ import InternalComponent, { handleDeprecatedArguments, handleDeprecatedAttributeArguments, handleDeprecatedEventArguments, - jQueryEventShim, opaquify, } from './internal'; @@ -710,8 +708,4 @@ if (EMBER_MODERNIZED_BUILT_IN_COMPONENTS) { } } -if (JQUERY_INTEGRATION) { - jQueryEventShim(LinkTo); -} - export default opaquify(LinkTo, LinkToTemplate);