-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
console context(optional DOMString label = ""); | ||
}; | ||
</pre> | ||
|
||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Again, not convinced about this name |
||
|
||
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 commentThe 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) |
||
|
||
<h4 id="context" method for="console">context(|label|)</h4> | ||
|
||
1. Let |context| be a new {{console}} namespace object. | ||
1. Let |contextName| be the empty string. | ||
1. If |label| is not null, then set |contextName| to |label|. | ||
1. Set |context|'s <a>context name</a> to |contextName|. | ||
1. Return |context|. | ||
|
||
<h2 id="supporting-ops">Supporting abstract operations</h2> | ||
|
||
<h3 id="logger" abstract-op lt="Logger">Logger(|logLevel|, |args|)</h3> | ||
|
@@ -513,6 +528,9 @@ enhancements: | |
src="images/severity-filter.png"> | ||
</div> | ||
</li> | ||
<li> | ||
Extra UI allowing the user to filter messages by context name | ||
</li> | ||
<li> | ||
Extra UI off to the side indicating the current state of the <a>timer table</a>, | ||
<a>group stack</a>, or other internally maintained data. | ||
|
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