Skip to content

Commit 3cf1432

Browse files
committed
chore: remove dead code
getStylesheetTokenHost was removed in #4865
1 parent 58e9794 commit 3cf1432

File tree

1 file changed

+3
-20
lines changed

1 file changed

+3
-20
lines changed

packages/@lwc/engine-core/src/framework/stylesheet.ts

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, salesforce.com, inc.
2+
* Copyright (c) 2025, Salesforce, Inc.
33
* All rights reserved.
44
* SPDX-License-Identifier: MIT
55
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
@@ -20,12 +20,11 @@ import { logError } from '../shared/logger';
2020

2121
import api from './api';
2222
import { RenderMode, ShadowMode } from './vm';
23-
import { computeHasScopedStyles, hasStyles } from './template';
23+
import { hasStyles } from './template';
2424
import { getStyleOrSwappedStyle } from './hot-swaps';
2525
import { checkVersionMismatch } from './check-version-mismatch';
26-
import { getComponentInternalDef } from './def';
2726
import { assertNotProd, EmptyArray } from './utils';
28-
import type { VCustomElement, VNode } from './vnodes';
27+
import type { VNode } from './vnodes';
2928
import type { Template } from './template';
3029
import type { VM } from './vm';
3130
import type { Stylesheet, Stylesheets } from '@lwc/shared';
@@ -321,22 +320,6 @@ export function getScopeTokenClass(owner: VM, legacy: boolean): string | null {
321320
);
322321
}
323322

324-
/**
325-
* This function returns the host style token for a custom element if it
326-
* exists. Otherwise it returns null.
327-
*
328-
* A host style token is applied to the component if scoped styles are used.
329-
* @param vnode
330-
*/
331-
export function getStylesheetTokenHost(vnode: VCustomElement): string | null {
332-
const { template } = getComponentInternalDef(vnode.ctor);
333-
const { vm } = vnode;
334-
const { stylesheetToken } = template;
335-
return !isUndefined(stylesheetToken) && computeHasScopedStyles(template, vm)
336-
? makeHostToken(stylesheetToken)
337-
: null;
338-
}
339-
340323
function getNearestNativeShadowComponent(vm: VM): VM | null {
341324
const owner = getNearestShadowComponent(vm);
342325
if (!isNull(owner) && owner.shadowMode === ShadowMode.Synthetic) {

0 commit comments

Comments
 (0)