MCPcopy
hub / github.com/alibaba/lowcode-engine / loadStyle

Method loadStyle

packages/utils/src/asset.ts:245–260  ·  view source on GitHub ↗
(content: string | undefined | null, level: AssetLevel, isUrl?: boolean, id?: string)

Source from the content-addressed store, hash-verified

243 }
244
245 private loadStyle(content: string | undefined | null, level: AssetLevel, isUrl?: boolean, id?: string) {
246 if (!content) {
247 return;
248 }
249 let point: StylePoint | undefined;
250 if (id) {
251 point = this.stylePoints.get(id);
252 if (!point) {
253 point = new StylePoint(level, id);
254 this.stylePoints.set(id, point);
255 }
256 } else {
257 point = new StylePoint(level);
258 }
259 return isUrl ? point.applyUrl(content) : point.applyText(content);
260 }
261
262 private loadScript(content: string | undefined | null, isUrl?: boolean, scriptType?: string) {
263 if (!content) {

Callers 1

loadMethod · 0.95

Calls 4

applyUrlMethod · 0.80
applyTextMethod · 0.80
getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected