diff --git a/packages/@lwc/engine-core/src/framework/invoker.ts b/packages/@lwc/engine-core/src/framework/invoker.ts index fa0877a514..8ebe2ccd86 100644 --- a/packages/@lwc/engine-core/src/framework/invoker.ts +++ b/packages/@lwc/engine-core/src/framework/invoker.ts @@ -58,7 +58,7 @@ export function invokeComponentConstructor(vm: VM, Ctor: LightningElementConstru // the "instanceof" operator would not work here since Locker Service provides its own // implementation of LightningElement, so we indirectly check if the base constructor is // invoked by accessing the component on the vm. - const isInvalidConstructor = lwcRuntimeFlags.ENABLE_LEGACY_LOCKER_SUPPORT + const isInvalidConstructor = lwcRuntimeFlags.LEGACY_LOCKER_ENABLED ? vmBeingConstructed.component !== result : !(result instanceof LightningElement); diff --git a/packages/@lwc/features/src/index.ts b/packages/@lwc/features/src/index.ts index d85e8276ca..c3f454830c 100644 --- a/packages/@lwc/features/src/index.ts +++ b/packages/@lwc/features/src/index.ts @@ -20,7 +20,7 @@ const features: FeatureFlagMap = { ENABLE_FORCE_SHADOW_MIGRATE_MODE: null, ENABLE_EXPERIMENTAL_SIGNALS: null, DISABLE_SYNTHETIC_SHADOW: null, - ENABLE_LEGACY_LOCKER_SUPPORT: null, + LEGACY_LOCKER_ENABLED: null, }; if (!(globalThis as any).lwcRuntimeFlags) { diff --git a/packages/@lwc/features/src/types.ts b/packages/@lwc/features/src/types.ts index a2f148d73e..61c58b985d 100644 --- a/packages/@lwc/features/src/types.ts +++ b/packages/@lwc/features/src/types.ts @@ -80,7 +80,7 @@ export interface FeatureFlagMap { * If true, then lightning legacy locker is supported, otherwise lightning legacy locker will not function * properly. */ - ENABLE_LEGACY_LOCKER_SUPPORT: FeatureFlagValue; + LEGACY_LOCKER_ENABLED: FeatureFlagValue; } export type FeatureFlagName = keyof FeatureFlagMap; diff --git a/packages/@lwc/integration-karma/test/api/createElement/index.spec.js b/packages/@lwc/integration-karma/test/api/createElement/index.spec.js index a9beeab9d6..54c3b8f6e8 100644 --- a/packages/@lwc/integration-karma/test/api/createElement/index.spec.js +++ b/packages/@lwc/integration-karma/test/api/createElement/index.spec.js @@ -98,10 +98,10 @@ describe.runIf(process.env.NATIVE_SHADOW)('native shadow', () => { describe('locker integration', () => { beforeEach(() => { - setFeatureFlagForTest('ENABLE_LEGACY_LOCKER_SUPPORT', true); + setFeatureFlagForTest('LEGACY_LOCKER_ENABLED', true); }); afterEach(() => { - setFeatureFlagForTest('ENABLE_LEGACY_LOCKER_SUPPORT', false); + setFeatureFlagForTest('LEGACY_LOCKER_ENABLED', false); }); it('should support component class that extend a mirror of the LightningElement', () => { function SecureBaseClass() { diff --git a/packages/@lwc/integration-karma/test/integrations/locker/index.spec.js b/packages/@lwc/integration-karma/test/integrations/locker/index.spec.js index 131135afac..e1da1fd055 100644 --- a/packages/@lwc/integration-karma/test/integrations/locker/index.spec.js +++ b/packages/@lwc/integration-karma/test/integrations/locker/index.spec.js @@ -4,10 +4,10 @@ import LockerIntegration from 'x/lockerIntegration'; import LockerLiveComponent from 'x/lockerLiveComponent'; import LockerHooks, { hooks } from 'x/lockerHooks'; beforeEach(() => { - setFeatureFlagForTest('ENABLE_LEGACY_LOCKER_SUPPORT', true); + setFeatureFlagForTest('LEGACY_LOCKER_ENABLED', true); }); afterEach(() => { - setFeatureFlagForTest('ENABLE_LEGACY_LOCKER_SUPPORT', false); + setFeatureFlagForTest('LEGACY_LOCKER_ENABLED', false); }); it('should support Locker integration which uses a wrapped LightningElement base class', () => { const elm = createElement('x-secure-parent', { is: LockerIntegration });