-
Notifications
You must be signed in to change notification settings - Fork 172
Update SessionManager example #421
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
Conversation
index.bs
Outdated
@@ -3460,7 +3457,9 @@ interfaces that have interface members with these names. | |||
|
|||
typeof SessionManager.prototype.values; // Evaluates to "function" | |||
var it = sm.values(); // values() returns an iterator object | |||
String(it); // Evaluates to "[object SessionManager Iterator]" | |||
String(it); // Evaluates to "[object SessionManagerIterator]" |
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 think we should change this now. Maybe comment out the whole thing?
index.bs
Outdated
and [index, session object] pairs, respectively. It also has | ||
next value to be iterated over. It has <code>keys</code> and <code>entries</code> | ||
methods that iterate over the usernames of session objects | ||
and [username, Session object] pairs, respectively. It also has |
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.
Can you use the tuple/pair notation from infra here (either (username, Session object)
or username/Session object
)?
index.bs
Outdated
@@ -3460,7 +3457,8 @@ interfaces that have interface members with these names. | |||
|
|||
typeof SessionManager.prototype.values; // Evaluates to "function" | |||
var it = sm.values(); // values() returns an iterator object | |||
String(it); // Evaluates to "[object SessionManager Iterator]" | |||
<!-- String(it); // Evaluates to "[object SessionManagerIterator]" | |||
// TODO: https://github.com/heycam/webidl/issues/419 --> | |||
typeof it.next; // Evaluates to "function" | |||
|
|||
// This loop will alert "anna" and then "brian". |
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.
Sorry I didn't notice that before, can you change this to "log" stuff rather than "alert" it?
So s/This loop will also alert/This loop will also log/
and s/window.alert/console.log/
.
Would be happy to update the class string once #419 is resolved, but submitting this for review first.
Preview | Diff