StorageIterator

storage/SessionStorage~ StorageIterator

Implementation of the iterator protocol and the iterable protocol for DOM storage keys.

Constructor

new StorageIterator(storage)

Source:
See:
Initializes the DOM storage iterator.
Parameters:
Name Type Description
storage Storage The DOM storage to iterate through.

Members

_currentKeyIndex :number

Source:
The current index of the DOM storage key this iterator will return next.
Type:
  • number

_storage :Storage

Source:
The DOM storage being iterated.
Type:
  • Storage

Methods

next() → {Object}

Source:
Iterates to the next item. This method implements the iterator protocol.
Returns:
The next value in the sequence and whether the iterator is done iterating through the values.
Type
Object

Symbol.iterator() → {StorageIterator}

Source:
Returns the iterator for this object (this iterator). This method implements the iterable protocol and provides compatibility with the for..of loops.
Returns:
This iterator.
Type
StorageIterator