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

Function applyVendor

javascript/selenium-webdriver/generate_bidi.mjs:228–232  ·  view source on GitHub ↗

* Apply Selenium vendor overlay CDDL (see common/bidi/*-extensions.cddl) to the AST. * A vendor overlay extends a spec extension point (e.g. `webExtension.InstallParametersExtension * //= (...)`) with typed browser-specific fields. Unlike a plain override, every field a vendor * overlay contribut

(ast, vendorArgs)

Source from the content-addressed store, hash-verified

226 * overrides so the extension point they extend is already present for the `//=` fold.
227 */
228function applyVendor(ast, vendorArgs) {
229 if (!vendorArgs.length) return ast
230 const vendorDefs = vendorArgs.flatMap((arg) => tagVendorDefs(parseCddl(arg), vendorFileStem(arg)))
231 return [...ast, ...vendorDefs]
232}
233
234function vendorFileStem(cddlArg) {
235 return basename(resolveInputPath(cddlArg)).replace(/\.cddl$/, '')

Callers 1

mainFunction · 0.85

Calls 3

tagVendorDefsFunction · 0.85
parseCddlFunction · 0.85
vendorFileStemFunction · 0.85

Tested by

no test coverage detected