(extension)
| 197 | } |
| 198 | |
| 199 | function 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. |
| 208 | const ARCHIVE_SIGNATURES = [Buffer.from('PK\x03\x04', 'latin1'), Buffer.from('Cr24', 'latin1')] |
no outgoing calls
no test coverage detected