Open whimboo opened 2 years ago
We do define at least one place where when a stack is expected: trace. In this instance, it's clear the behavior the developer wants.
Is the ask here to require agents to include the stack in their side effect actions? Or is the ask to make it clearer that agents may include a stack?
I see. So the requirement for console commands to have a stacktrace included only exists for trace
and for other commands it's up to the user agent to optionally provide that object? So yes, it might be good to have some paragraph that clarifies that in the console specification.
@whimboo Would you be willing to submit a spec PR for this? I'm happy to review it
@domfarolino I think it depends on the outcome of the above discussion. Can I assume that you all are fine with only trace
requiring a stacktrace and for all others it's optional? If that is clarified I may be able to create a PR. Thanks.
Sure, thanks for clarifying. Yes I think that sounds good to me, and would match implementations (i.e., Chrome adding stack trace information for console.warn()
).
@terinjokes does this sound good?
That clarification, that it's optional for other logging methods, sounds fine by me.
While implementing
stacktrace
support for console API calls for the WebDriver BiDi support in Firefox I noticed differences between browsers. Per the specification we should include thestacktrace
for the following methods:Hereby Firefox does not add a stacktrace for calls to
warn()
, whereby Chrome does it.It would be easy to add, but in general it would be great to have the availability of the
stacktrace
for methods defined in the console specification.