MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / hostContext

Function hostContext

core/src/utils/theme.ts:4–6  ·  view source on GitHub ↗
(selector: string, el: HTMLElement)

Source from the content-addressed store, hash-verified

2import type { AnimationBuilder, Color, CssClassMap } from '../interface';
3
4export const hostContext = (selector: string, el: HTMLElement): boolean => {
5 return el.closest(selector) !== null;
6};
7
8/**
9 * Create the mode and color classes for the component based on the classes passed in

Callers 15

renderMethod · 0.90
renderMethod · 0.90
renderMethod · 0.90
renderMethod · 0.90
renderMethod · 0.90
renderMethod · 0.90
renderMethod · 0.90
renderMethod · 0.90
renderMethod · 0.90
renderMethod · 0.90
renderMethod · 0.90
renderMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected