Skip to content

Commit cdcbc25

Browse files
committed
[css-layout-api] Add spec issue re: promises vs. generators.
1 parent 98690e2 commit cdcbc25

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

css-layout-api/Overview.bs

+16
Original file line numberDiff line numberDiff line change
@@ -1273,6 +1273,22 @@ is called, the user agent <em>must</em> run the following steps:
12731273
Layout Engine {#layout-engine}
12741274
------------------------------
12751275

1276+
<div class="issue">
1277+
Issue: Currently the API is in an iterable generator form. Based on implementation experience, and
1278+
web developer experience, this may change to promise based API instead. There are both pros and
1279+
cons to each of these.
1280+
1281+
<em>Promises</em>
1282+
- Better error reporting.
1283+
- Potentially better developer ergonomics.
1284+
1285+
<em>Generator</em>
1286+
- More "strict" - can only perform layout operations. Don't have to restrict which promise APIs
1287+
work each call.
1288+
- Potentially better bindings overhead.
1289+
</div>
1290+
1291+
12761292
<pre class="idl">
12771293
[Exposed=LayoutWorklet]
12781294
interface LayoutFragmentRequest {

0 commit comments

Comments
 (0)