MCPcopy Index your code
hub / github.com/codedogQBY/ReadAny / replace

Method replace

packages/foliate-js/epub.js:1001–1002  ·  view source on GitHub ↗
(el, attr)

Source from the content-addressed store, hash-verified

999 // replace hrefs (excluding anchors)
1000 // TODO: srcset?
1001 const replace = async (el, attr) =>
1002 el.setAttribute(attr, await this.loadHref(el.getAttribute(attr), href, parents));
1003 for (const el of doc.querySelectorAll("link[href]")) await replace(el, "href");
1004 for (const el of doc.querySelectorAll("[src]")) await replace(el, "src");
1005 for (const el of doc.querySelectorAll("[poster]")) await replace(el, "poster");

Callers 15

testRemoteModelFunction · 0.80
getCodeLanguageFunction · 0.80
UpdateDialogFunction · 0.80
RichTextEditorFunction · 0.80
safeSvgFilenameFunction · 0.80
MermaidViewFunction · 0.80
safeSvgFilenameFunction · 0.80
generateHtmlFunction · 0.80
fetchGoogleModelsFunction · 0.80
previewSessionSegmentsFunction · 0.80
restoreDeletedMobileBookFunction · 0.80

Calls 2

loadHrefMethod · 0.95
setAttributeMethod · 0.80

Tested by 3

createTestPlatformFunction · 0.64
selectMethod · 0.64
executeMethod · 0.64