MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / cascadeRemoveGsapById

Function cascadeRemoveGsapById

packages/parsers/src/htmlParser.ts:742–749  ·  view source on GitHub ↗
(doc: Document, elementId: string)

Source from the content-addressed store, hash-verified

740}
741
742function cascadeRemoveGsapById(doc: Document, elementId: string): void {
743 for (const script of Array.from(doc.querySelectorAll("script"))) {
744 const text = script.textContent ?? "";
745 if (!text.includes("gsap") && !text.includes("ScrollTrigger")) continue;
746 const updated = stripGsapForId(text, elementId);
747 if (updated !== text) script.textContent = updated;
748 }
749}
750
751export function removeElementFromHtml(html: string, elementId: string): string {
752 const parser = new DOMParser();

Callers 1

removeElementFromHtmlFunction · 0.85

Calls 2

stripGsapForIdFunction · 0.85
fromMethod · 0.80

Tested by

no test coverage detected