Skip to content

Commit a6f087b

Browse files
authored
Remove IteratorRemoteValue from the spec (#691)
Currently, how IteratorRemoteValue is not specified as per #537 Additionally, a general iterator is any object with a next method as per https://tc39.es/ecma262/multipage/control-abstraction-objects.html#sec-iterator-interface Since there is currently no use case requiring serialzation support of iterators, we propose removing IteratorRemoteValue from the spec. The following use cases have been considered: 1) In puppeteer code, ``` сonst it = await page.evaluateHandle(() => produce an iterator) await it.evaluate(it => it.next()) ``` Conclusion: serialization as an object is sufficient, sicne the user knows if they are dealing with an iterator and additionally they can check for the presence of the next method if needed. 2) Logging an iterator object to console We believe that serializing an iterator as an object, would be sufficient.
1 parent 2244472 commit a6f087b

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

index.bs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7720,7 +7720,6 @@ script.RemoteValue = (
77207720
script.SetRemoteValue /
77217721
script.WeakMapRemoteValue /
77227722
script.WeakSetRemoteValue /
7723-
script.IteratorRemoteValue /
77247723
script.GeneratorRemoteValue /
77257724
script.ErrorRemoteValue /
77267725
script.ProxyRemoteValue /
@@ -7799,12 +7798,6 @@ script.WeakSetRemoteValue = {
77997798
? internalId: script.InternalId,
78007799
}
78017800

7802-
script.IteratorRemoteValue = {
7803-
type: "iterator",
7804-
? handle: script.Handle,
7805-
? internalId: script.InternalId,
7806-
}
7807-
78087801
script.GeneratorRemoteValue = {
78097802
type: "generator",
78107803
? handle: script.Handle,
@@ -7891,8 +7884,6 @@ Issue: Add WASM types?
78917884

78927885
Issue: Should WindowProxy get attributes in a similar style to Node?
78937886

7894-
Issue: Describe `script.IteratorRemoteValue` serialization.
7895-
78967887
Issue: handle String / Number / etc. wrapper objects specially?
78977888

78987889
Values accessible from the ECMAScript runtime are represented by a mirror

0 commit comments

Comments
 (0)