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

Function buildSpecLinks

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

Source from the content-addressed store, hash-verified

603 * @returns {{types:object,commands:object,events:object,domains:object}}
604 */
605export function buildSpecLinks(dfnsDocs, anchors = {}) {
606 const types = {}
607 for (const [name, href] of Object.entries(buildSpecHrefs(dfnsDocs))) types[name.toLowerCase()] = href
608 Object.assign(types, anchors.types ?? {}) // the prose section wins over the CDDL production
609 return {
610 types,
611 commands: { ...(anchors.commands ?? {}) },
612 events: { ...(anchors.events ?? {}) },
613 domains: { ...(anchors.modules ?? {}) },
614 }
615}
616
617// Every type name a *type expression* references (the value of a `field.type`, or a
618// list element / map value type), descending through list, map, inline union arms, and

Callers 2

mainFunction · 0.85

Calls 2

buildSpecHrefsFunction · 0.85
entriesMethod · 0.80

Tested by

no test coverage detected