Re: [streams] ReadableStream.getReader name is a bit misleading (#308)

Indeed. Here are other methods that follow the getX() pattern and return a new object every time:

- From DOM:
  - getElementsByTagName/getElementsByTagNameNS
  - getElementsByClassName
- From HTML:
  - PropertyNodeList.prototype.getValues
  - Document.prototype.getElementsByName
  - Document.prototype.getItems
  - TextTrackCue.prototype.getCueAsHTML
  - CanvasRenderingContext2D.prototype.getImageData/getImageDataHD
  - CanvasDrawingStyles.prototype.getLineDash
  - DataTransfer.prototype.getData
  - DataTransferItem.prototype.getAsFile

And that's just going through some IDL files...

There are indeed a few instances where the same object could be returned, e.g. getAttribute or getElementById. But there's definitely no consensus.

Does this allay your concerns, @youennf?

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/308#issuecomment-88474774

Received on Wednesday, 1 April 2015 13:13:07 UTC