GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — State explicitly in docs that 'close' does not take any arguments · Issue #20018 · nodejs/node

State explicitly in docs that 'close' does not take any arguments #20018

New issue
Copy link
New issue
Copy link
Closed
Closed
State explicitly in docs that 'close' does not take any arguments#20018
Copy link
Labels
docIssues and PRs related to Node.js documentation.good first issueIssues that are suitable for first-time contributors.http2Issues and PRs related to the http2 subsystem.

Description

@ryzokuken
ryzokuken
opened on Apr 13, 2018
Issue body actions

In the http2 module, the Http2Session class emits an event named close, which is documented at https://github.com/nodejs/node/blob/master/doc/api/http2.md#event-close.

As evident from the following function from lib/internal/http2/core.js, the event does not expect any arguments:

function emitClose(self, error) {
  if (error)
    self.emit('error', error);
  self.emit('close');
}

However, the current docs do a poor job of communicating this, therefore creating confusion.

Thus, the fact that the close event does not expect arguments should be explicitly mentioned in the docs.

The exact source can be found at:

node/doc/api/http2.md

Lines 126 to 131 in 6376d43

#### Event: 'close'
<!-- YAML
added: v8.4.0
-->
The `'close'` event is emitted once the `Http2Session` has been destroyed.

Activity

  1. ryzokuken commented on Apr 13, 2018

    @ryzokuken
    ryzokuken
    on Apr 13, 2018
    ContributorAuthor
    More actions

    cc @mcollina @nodejs/http2 does this look good? Feel free to suggest any structural changes, and I'd base the remaining issues on the finalized structure.

  2. jasnell commented on Apr 13, 2018

    @jasnell
    jasnell
    on Apr 13, 2018
    Member
    More actions

    This is fine. Want to open a PR?

  3. jasnell
    added
    docIssues and PRs related to Node.js documentation.
    http2Issues and PRs related to the http2 subsystem.
    on Apr 13, 2018
  4. ryzokuken commented on Apr 13, 2018

    @ryzokuken
    ryzokuken
    on Apr 13, 2018
    ContributorAuthor
    More actions

    @jasnell

    At nodejs/help#877 (comment), @mcollina had suggested opening a few "good first issues", and that was why I was interested in the structure of the issue (so that first time contributors find it convenient). That said, I'm willing to open a PR if that's what you're propose, but that wasn't the intent when I opened the issue.

  5. mcollina
    added
    good first issueIssues that are suitable for first-time contributors.
    on Apr 14, 2018
  6. mcollina commented on Apr 14, 2018

    @mcollina
    mcollina
    on Apr 14, 2018
    SponsorMember
    More actions

    Added the "good first issue tag"

  7. indranil
    added 2 commits that reference this issue on Apr 14, 2018

    doc: added explicitly that the close event does not take arguments

    83008db

    doc: changed wording to better state listener

    158aeb4
  8. trivikr
    closed this as completedin 594e59don Apr 14, 2018
  9. jasnell
    added a commit that references this issue on Apr 16, 2018

    doc: close event does not take arguments

    98008dc
  10. BridgeAR
    added a commit that references this issue on May 1, 2018

    doc: close event does not take arguments

    80e496f
  11. kjin
    added a commit that references this issue on Aug 23, 2018

    doc: close event does not take arguments

    d2691d6
  12. kjin
    added 4 commits that reference this issue on Sep 11, 2018

    doc: close event does not take arguments

    f5a9fec

    doc: close event does not take arguments

    713d357
  13. kjin
    added a commit that references this issue on Oct 16, 2018

    doc: close event does not take arguments

    f3f4ee6
  14. sjarmak
    added a commit that references this issue on Jul 27, 2026

    doc: close event does not take arguments

    594e59d
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

    docIssues and PRs related to Node.js documentation.good first issueIssues that are suitable for first-time contributors.http2Issues and PRs related to the http2 subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.