MCPcopy Index your code
hub / github.com/easydiffusion/easydiffusion / replaceContent

Function replaceContent

ui/media/js/utils.js:837–849  ·  view source on GitHub ↗
(resultFactory)

Source from the content-addressed store, hash-verified

835 linkTabContents(tab)
836
837 function replaceContent(resultFactory) {
838 if (resultFactory === undefined || resultFactory === null) {
839 return
840 }
841 const result = typeof resultFactory === "function" ? resultFactory() : resultFactory
842 if (result instanceof Promise) {
843 result.then(replaceContent)
844 } else if (result instanceof Node) {
845 wrapper.replaceChildren(result)
846 } else {
847 wrapper.innerHTML = result
848 }
849 }
850
851 replaceContent(request.content)
852

Callers 1

createTabFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected