MCPcopy Create free account
hub / github.com/UI5/webcomponents / getMetaTagValue

Function getMetaTagValue

packages/base/src/validateThemeRoot.ts:3–8  ·  view source on GitHub ↗
(metaTagName: string)

Source from the content-addressed store, hash-verified

1import { getLocationHref } from "./Location.js";
2
3const getMetaTagValue = (metaTagName: string) => {
4 const metaTag = document.querySelector(`META[name="${metaTagName}"]`),
5 metaTagContent = metaTag && metaTag.getAttribute("content");
6
7 return metaTagContent;
8};
9
10const validateThemeOrigin = (origin: string, isSameOrigin: boolean = false) => {
11 const allowedOrigins = getMetaTagValue("sap-allowed-theme-origins") ?? getMetaTagValue("sap-allowedThemeOrigins"); // Prioritize the new meta tag name

Callers 1

validateThemeOriginFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…