MCPcopy Index your code
hub / github.com/caseywebdev/react-list / preinitModuleScript

Function preinitModuleScript

docs/index.js:17290–17315  ·  view source on GitHub ↗
(src, options)

Source from the content-addressed store, hash-verified

17288 }
17289}
17290function preinitModuleScript(src, options) {
17291 previousDispatcher.M(src, options);
17292 var ownerDocument = globalDocument;
17293 if (ownerDocument && src) {
17294 var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts,
17295 key = getScriptKey(src),
17296 resource = scripts.get(key);
17297 resource ||
17298 ((resource = ownerDocument.querySelector(getScriptSelectorFromKey(key))),
17299 resource ||
17300 ((src = assign({ src: src, async: !0, type: "module" }, options)),
17301 (options = preloadPropsMap.get(key)) &&
17302 adoptPreloadPropsForScript(src, options),
17303 (resource = ownerDocument.createElement("script")),
17304 markNodeAsHoistable(resource),
17305 setInitialProperties(resource, "link", src),
17306 ownerDocument.head.appendChild(resource)),
17307 (resource = {
17308 type: "script",
17309 instance: resource,
17310 count: 1,
17311 state: null
17312 }),
17313 scripts.set(key, resource));
17314 }
17315}
17316function getResource(type, currentProps, pendingProps, currentResource) {
17317 var JSCompiler_inline_result = (JSCompiler_inline_result =
17318 rootInstanceStackCursor.current)

Callers

nothing calls this directly

Calls 6

getResourcesFromRootFunction · 0.85
getScriptKeyFunction · 0.85
getScriptSelectorFromKeyFunction · 0.85
markNodeAsHoistableFunction · 0.85
setInitialPropertiesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…