Skip to content
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

Use push/pop or append/take-the-first #45

Closed
jyasskin opened this issue May 20, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@jyasskin
Copy link
Member

commented May 20, 2016

https://www.w3.org/TR/requestidlecallback/#dfn-invoke-idle-callbacks-algorithm says "Pop callback from document's Window object's list of runnable idle callbacks.", but other uses of that list say "Append all entries from doclist into runlist preserving order." or "Append callback to window's list of idle request callbacks".

It's not clear whether "pop" means to take the element from the beginning of the list or the end. Using push/pop would make it clear that this is a stack, while append/take-the-first would make it clear that it's a queue.

@rmcilroy

This comment has been minimized.

Copy link
Contributor

commented Jun 24, 2016

The intended semantics are that of a queue. I'm don't necessarily think push/pop implies stack semantics (e.g., std::queue uses push/pop), but agree we this could be clearer. How about "pop the first element" (to make it clear the element should be removed)?

@igrigorik igrigorik added this to the Level 1 milestone Jun 29, 2016

@igrigorik igrigorik self-assigned this Jun 29, 2016

@igrigorik

This comment has been minimized.

Copy link
Member

commented Nov 28, 2016

Looking at the HTML spec: Pop the top element from the stack; Pop the top entry; ...

Push callback to the end of window's list of idle request callbacks...
Pop the top callback from document's Window objects...

Does that work?

@rmcilroy

This comment has been minimized.

Copy link
Contributor

commented Nov 29, 2016

Works for me 👍

igrigorik added a commit that referenced this issue Nov 30, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.