Skip to content

Should clearTimeout/clearInterval be interchangeable? #179

Closed

Description

@jdm

The spec is unclear whether clearTimeout should clear an active timer that was started using setInterval.

Activity

  1. domenic commented on Sep 23, 2015

    @domenic
    Member

    How is it not clear?

    The clearTimeout() and clearInterval() methods must clear the entry identified as handle from the list of active timers of the WindowTimers object on which the method was invoked, if any, where handle is the argument passed to the method.

    There's a single list of active timers.

  2. jdm commented on Sep 23, 2015

    @jdm
    MemberAuthor

    Eh. A note calling out that they can be used interchangeably would have been clearer to me.

  3. domenic commented on Sep 23, 2015

    @domenic
    Member

    I think the spec is exceptionally clear here, and anything that duplicates that information should be left to places like MDN. Any other editors disagree?

  4. added
    clarification
    on Sep 23, 2015
  5. annevk commented on Sep 24, 2015

    @annevk
    Member

    Since it's a bit surprising I wouldn't object to a PR for a note. <span class="note">They indeed clear entries from the same list.</span> That this can potentially bite new implementations (@jdm works on Servo) is somewhat telling.

  6. Ms2ger commented on Sep 24, 2015

    @Ms2ger
    Member

    Servo actually gets it right; I'd just always assumed it was wrong. This seems surprising enough to warrant an extra note.

  7. added
    good first issue
    on Sep 24, 2015
  8. added 5 commits that reference this issue on Oct 23, 2015
    570e523
    d68e319
    026878e
    820d6ea
    4b3e06e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    clarificationgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions