An empty script_id also marks a script-type initiator, such as a module
import, whose url is the importing script file. Its position is a real
script position without a session-script association. The previous
wording called every empty-ID callsite parser markup with "no script
position" and excluded it from the external-script conversion. Describe
the empty ID as a missing session-script association, which only rules
out joining captured source or resource_start, and keep the
external-script conversion for script-file positions.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
observe_web_execution also derives callsites from a request's reported
initiator, such as an image the parser found in HTML or a module import,
with an empty script_id. Those positions point into the initiating
resource, not a script, so the "script's enclosing resource" wording and
source-map conversion did not apply to them. Describe the coordinates as
relative to the resource named by url, explain empty script IDs, and
limit the documented conversion to positions with a script_id.
Co-authored-by: Claude Opus 5.5 <[email protected]>
* fix(browser): advertise zero-based units for runtime source coordinates
inspect_web_event_listeners and observe_web_execution return CDP
callsite, listener and resource_start line_number/column_number values
unchanged: zero-based lines and UTF-16 columns. Neither the advertised
output schema nor docs/web-runtime.md said so. trace_web_source_location
takes one-based lines, so a caller chaining a listener location into it
lands one line early.
Describe the units on the shared schema fields, which reach both tools'
advertised output schemas, and document the conversion.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(browser): describe runtime positions relative to the enclosing resource
For an inline <script>, CDP reports listener and callsite positions
relative to the HTML document, and resource_start is where the script
text starts in that document. A real headless Chromium 155 page showed
this: a listener on HTML line 6 came back as line_number 5, with
resource_start {3, 8}. Describe all positions as relative to the
enclosing resource. Document that inline-script positions must have
resource_start subtracted, plus one added to the line, before
trace_web_source_location.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs(browser): clarify runtime-to-source coordinate conversion
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: N0zoM1z0 <[email protected]>