public virtual object Next() { if (!iterator.HasNext()) { // Out of values. Throw StopIteration. throw new JavaScriptException(NativeIterator.GetStopIterationObject(scope), null, 0); } return iterator.Next(); }