Open annevk opened 4 years ago
Example from Indexed DB, text suggested by @domenic
Let operation be an algorithm to run store a record into an object store with store, clone, key, and no-overwrite flag.
Streams uses e.g.
Let pullAlgorithm be an algorithm that returns a promise resolved with undefined.
and:
...set cancelAlgorithm to an algorithm which takes an argument reason and returns the result of invoking underlyingSourceDict[
"cancel"
] with argument list « reason » and callback this value underlyingSource.
Is this a duplicate of #206?
In any case, this and #206 should be defined in the same section, and the definition should say what happens if they refer to variables from the surrounding scope. (I think we usually assume they capture references so that people can make closures.)
In https://github.com/whatwg/html/pull/5560#discussion_r436160750 @inexorabletash suggests formalizing lambdas, e.g.: