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

Function checkExtensionArg

javascript/selenium-webdriver/lib/web_extension.js:199–205  ·  view source on GitHub ↗
(extension)

Source from the content-addressed store, hash-verified

197}
198
199function checkExtensionArg(extension) {
200 if (typeof extension !== 'string' || extension === '') {
201 throw new error.InvalidArgumentError(
202 `installWebExtension expects a path or a base64 string, got ${extension === '' ? 'an empty string' : typeof extension}`,
203 )
204 }
205}
206
207// Leading bytes of a packed extension: a zip (.xpi, .zip) or a Chrome .crx.
208const ARCHIVE_SIGNATURES = [Buffer.from('PK\x03\x04', 'latin1'), Buffer.from('Cr24', 'latin1')]

Callers 2

encodeExtensionFunction · 0.85
extensionDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected