MCPcopy
hub / github.com/webpack/webpack / findOurLink

Function findOurLink

test/hotCases/css/link-insert-hook/index.js:3–9  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import "./index.css";
2
3const findOurLink = () =>
4 [...window.document.getElementsByTagName("link")].find(
5 (item) =>
6 item.rel === "stylesheet" &&
7 item.href &&
8 item.href.includes("bundle.css")
9 );
10
11it("should run linkInsert source on HMR and reuse the existing link's parent", (done) => {
12 const initial = findOurLink();

Callers 1

index.jsFile · 0.70

Calls 1

getElementsByTagNameMethod · 0.80

Tested by

no test coverage detected