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

Function withVendor

javascript/selenium-webdriver/project_bidi_schema.mjs:856–864  ·  view source on GitHub ↗
(schema)

Source from the content-addressed store, hash-verified

854// The shared sections with every vendor section folded in: what the validators check, since
855// vendor refs resolve into the shared types and vendor messages need the same guarantees.
856function withVendor(schema) {
857 const sections = Object.values(schema.vendor ?? {})
858 return {
859 ...schema,
860 commands: [...schema.commands, ...sections.flatMap((s) => s.commands ?? [])],
861 events: [...schema.events, ...sections.flatMap((s) => s.events ?? [])],
862 types: Object.assign({}, schema.types, ...sections.map((s) => s.types ?? {})),
863 }
864}
865
866/**
867 * Fail-closed validation: every type reference resolves, and no type projects to

Callers 2

checkSchemaFunction · 0.85
checkCompletenessFunction · 0.85

Calls 2

valuesMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected