MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / buildSpecHrefs

Function buildSpecHrefs

javascript/selenium-webdriver/project_bidi_schema.mjs:578–586  ·  view source on GitHub ↗
(dfnsDocs)

Source from the content-addressed store, hash-verified

576 * @returns {Object<string,string>} Map from schema type name to its spec-definition URL.
577 */
578export function buildSpecHrefs(dfnsDocs) {
579 const hrefs = {}
580 for (const doc of dfnsDocs ?? [])
581 for (const dfn of doc?.dfns ?? []) {
582 const name = dfn.type === 'cddl-type' ? dfn.linkingText?.[0] : undefined
583 if (name && dfn.href && !(name in hrefs)) hrefs[name] = dfn.href
584 }
585 return hrefs
586}
587
588/**
589 * Compose the spec-link maps the projector attaches, from the webref CDDL indexes

Callers 2

buildSpecLinksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected