[adr] script and logging async/event API on driver.script#17776
[adr] script and logging async/event API on driver.script#17776titusfortner wants to merge 3 commits into
Conversation
PR Summary by QodoAdd ADR defining the driver.script async script & event API surface
AI Description
High-Level Assessment
Files changed (1)
|
0cca0fc to
c0cfe40
Compare
Code Review by Qodo
Context used✅ Compliance rules (platform):
11 rules 1. Old/new values undefined
|
There was a problem hiding this comment.
Pull request overview
Adds a new Architecture/Design Record (ADR) that standardizes the cross-binding, protocol-neutral driver.script surface for script execution/pinning and for console/JS-error/DOM-mutation event subscriptions, intended to guide Selenium 5 convergence work.
Changes:
- Defines the
driver.scriptAPI responsibilities and normative behavior forexecute,pin/unpin, andpreload/removal. - Specifies handler registration/removal semantics (including returning registration objects) and the expected shaped payloads for console/error/mutation events.
- Documents current per-binding divergence and the intended convergence outcomes.
|
Code review by qodo was updated up to the latest commit 5905691 |
|
Code review by qodo was updated up to the latest commit 309ef00 |
📄 The decision, its rationale, considered options, and consequences are in the record file this
PR adds (
docs/decisions/17776-bidi-script.md); read it there. The sections below are proposalnotes and review logistics.
🔗 Related
pin/unpin/execute, andadd/remove for console-message, JavaScript-error, and DOM-mutation handlers under
driver.script), and where the per-binding implementation history is tracked.driver.scriptis the protocol-neutralsurface consistent with that boundary.
📝 Proposal notes
the script and logging async/event API; on acceptance the charter links back to it.
driver.scriptaccessor; placing the
log-domain console and error events underscript;pin/unpin/execute; and separate add/remove handlers for console messages, JavaScript errors, and DOMmutations.
in two ways; the rest of its calls fill in details [🚀 Feature]: Implement high level BiDi script commands #13992 left unspecified and are reasoned in the
record:
preloadout ofpin— the summit had a singlepin; this separates run-by-handle(
pin) from run-on-every-navigation (preload). Naming both lets the record classify eachbinding's current
pinas one or the other;add_*, not an integer id.script.execute(source)overlaps the existingexecute_script(andexecuteAsyncScript); whetherscript.executesupersedes and deprecates them is a largermigration decision this record does not make.
stores pinned scripts, routes
log.entryAdded, and keys handler removal is left to the adoptingPRs.
🗣 Discussion
Pending — not yet discussed.
📌 Tracking
Tracking issue: (linked on acceptance)