MCPcopy
hub / github.com/webpack/webpack / createCssRunner

Method createCssRunner

test/harness/runner/index.js:761–771  ·  view source on GitHub ↗

* @returns {(moduleInfo: ModuleInfo, context: RequireContext) => EXPECTED_ANY} css runner

()

Source from the content-addressed store, hash-verified

759 * @returns {(moduleInfo: ModuleInfo, context: RequireContext) => EXPECTED_ANY} css runner
760 */
761 createCssRunner() {
762 return (moduleInfo) => {
763 if (this.hasWebTarget()) {
764 const link = this._moduleScope.document.createElement("link");
765 link.href = moduleInfo.origin;
766 this._moduleScope.document.head.appendChild(link);
767 }
768
769 return moduleInfo.content;
770 };
771 }
772
773 /**
774 * @returns {EXPECTED_ANY} env

Callers 1

createModuleRunnersMethod · 0.95

Calls 3

hasWebTargetMethod · 0.95
createElementMethod · 0.80
appendChildMethod · 0.80

Tested by

no test coverage detected