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

Function buildSpecLinks

javascript/selenium-webdriver/project_bidi_schema.mjs:531–541  ·  view source on GitHub ↗
(dfnsDocs, anchors = {})

Source from the content-addressed store, hash-verified

529 * @returns {{types:object,commands:object,events:object,domains:object}}
530 */
531export function buildSpecLinks(dfnsDocs, anchors = {}) {
532 const types = {}
533 for (const [name, href] of Object.entries(buildSpecHrefs(dfnsDocs))) types[name.toLowerCase()] = href
534 Object.assign(types, anchors.types ?? {}) // the prose section wins over the CDDL production
535 return {
536 types,
537 commands: { ...(anchors.commands ?? {}) },
538 events: { ...(anchors.events ?? {}) },
539 domains: { ...(anchors.modules ?? {}) },
540 }
541}
542
543// Every type name a *type expression* references (the value of a `field.type`, or a
544// list element / map value type), descending through list, map, inline union arms, and

Callers 2

mainFunction · 0.85

Calls 1

buildSpecHrefsFunction · 0.85

Tested by

no test coverage detected