Closed jyasskin closed 7 years ago
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)?
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?
Works for me :+1:
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.