Skip to content

Documentation for iterators, global, and browser environment missing #138

@tshinnic

Description

@tshinnic

README.md mentions some features only in passing, without supporting documentation, thus leaving some features 'hidden' and unusable.

It mentions ES2015 support and documents many of the added APIs, but not all. Surprised at no mention of iterators I still found them supported in the code.

Return possibilities

  'Map Iterator'
  'Set Iterator'
  'Array Iterator'
  'String Iterator'

should be documented, though it may be hard to come up with easily understood examples on when these values are encountered. A combination of built-in objects and method calls ...?

    assert(type(new Map()).entries() === 'Map Iterator')
    assert(type(new Set()).entries() === 'Set Iterator')

While spelunking I found these browser/DOM-related values in the code:

return value notes on source
'global' (browser) window , (node) global , others...
'Location' window.location
'Document' window.document
'MimeTypeArray' window.navigator.mimeTypes
'PluginArray' window.navigator.plugins
'HTMLQuoteElement' (IE fix) HTMLElement HTMLElement BLOCKQUOTE
'HTMLTableDataCellElement' (W3C vs. WhatWG fix) HTMLElement TD
'HTMLTableHeaderCellElement' (W3C vs. WhatWG fix) HTMLElement TH

After much scrolling of doc/code windows I think the above are all the missing parts.

If the mentions in passing of "global object", "iterators", "browsers" and "HTML elements" in README.md can be matched up with documented type string return values then readers will know how to use all the features this package provides.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions