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

Function build_event

py/generate_bidi_protocol.py:820–829  ·  view source on GitHub ↗
(schema: Schema, event: dict)

Source from the content-addressed store, hash-verified

818
819
820def build_event(schema: Schema, event: dict) -> EventIR:
821 params = event.get("params")
822 payload_ref = params.get("ref") if params else None
823 payload = schema.structured_ref(payload_ref) if payload_ref else None
824 _guard_same_domain(event["domain"], None, payload, event["method"])
825 return EventIR(
826 wire=event["method"],
827 name=safe_name(camel_to_snake(event["name"])),
828 payload_class=type_class_name(payload) if payload else None,
829 )
830
831
832def _guard_same_domain(domain: str, *type_names: str | None) -> None:

Callers 2

build_irMethod · 0.85
build_moduleFunction · 0.85

Calls 7

_guard_same_domainFunction · 0.85
EventIRClass · 0.85
safe_nameFunction · 0.85
camel_to_snakeFunction · 0.85
type_class_nameFunction · 0.85
getMethod · 0.65
structured_refMethod · 0.45

Tested by

no test coverage detected