Function
parseBidiMessage
(this: EventEmitter, data: ArrayBuffer)
Source from the content-addressed store, hash-verified
| 514 | } |
| 515 | |
| 516 | export function parseBidiMessage (this: EventEmitter, data: ArrayBuffer) { |
| 517 | try { |
| 518 | const payload: Event = JSON.parse(data.toString()) |
| 519 | if (payload.type !== 'event') { |
| 520 | return |
| 521 | } |
| 522 | |
| 523 | this.emit(payload.method as string, payload.params) |
| 524 | } catch (err) { |
| 525 | log.error(`Failed parse WebDriver Bidi message: ${(err as Error).message}`) |
| 526 | } |
| 527 | } |
| 528 | |
| 529 | /** |
| 530 | * Masks the `text` parameter in a WebDriver command if masking is enabled in the options. |
Callers
nothing calls this directly
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…