-
Notifications
You must be signed in to change notification settings - Fork 72
Specify console.context #244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This specifies the console.context(label) method which returns a new console namespace object with an optional context name label. Tests: TBD Fixes whatwg#193
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this is the first time I'm writing such spec PR and I could be doing things the wrong way.
@@ -83,6 +83,9 @@ namespace console { // but see namespace object requirements below | |||
undefined time(optional DOMString label = "default"); | |||
undefined timeLog(optional DOMString label = "default", any... data); | |||
undefined timeEnd(optional DOMString label = "default"); | |||
|
|||
// Contextualizing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really like this name, but couldn't find anything that would suit this. Maybe we don't need a "section" comment here? I was trying to replicate what was already there
@@ -291,6 +294,18 @@ for plans to make {{console/timeEnd()}} and {{console/timeLog()}} formally repor | |||
console when a given |label| does not exist in the associated <a>timer table</a>. | |||
</p> | |||
|
|||
<h3 id="contextualizing">Contextualizing</h3> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, not convinced about this name
@@ -291,6 +294,18 @@ for plans to make {{console/timeEnd()}} and {{console/timeLog()}} formally repor | |||
console when a given |label| does not exist in the associated <a>timer table</a>. | |||
</p> | |||
|
|||
<h3 id="contextualizing">Contextualizing</h3> | |||
|
|||
Each {{console}} namespace object has an associated <dfn>context name</dfn>, empty by default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we should have an example here, or indicate that the context name could be consumed in the UI (for display/filtering)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are drive-by comments. I don't have enough context to do a full review.
Thanks! I included your suggestions 👍 |
looks like I overlooked what a namespace object is, and I don't think it can be what is returned from |
This specifies the console.context(label) method which returns a new console namespace object with an optional context name label.
Tests: TODO
Fixes #193
console.context()
but logging with returned instance doesn't print anything. Linked issue mentions the lack of spec for the method).Preview | Diff